home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-12-14 | 1.3 MB | 55,593 lines |
Text Truncated. Only the first 1MB is shown below. Download the file for the complete contents.
- *** ../mh-6.7.2/Patchlevel Wed Jan 22 13:37:46 1992
- --- Patchlevel Mon Dec 14 16:24:15 1992
- ***************
- *** 1 ****
- ! MH.6.7 patch.2
- --- 1 ----
- ! MH.6.8 patch.0
- *** ../mh-6.7.2/conf/Makefile Thu Apr 5 16:05:23 1990
- --- conf/Makefile Mon Oct 26 14:36:23 1992
- ***************
- *** 3,5 ****
- ######################################################################
- ! # @(#)$Id: Makefile,v 2.2 90/04/05 15:18:33 sources Exp $
-
- --- 3,7 ----
- ######################################################################
- ! # @(#)$Id: Makefile,v 2.3 1992/10/26 22:36:21 jromine Exp $
- !
- ! SHELL = /bin/sh
-
- *** ../mh-6.7.2/conf/config/config.c Fri Jan 24 17:10:25 1992
- --- conf/config/config.c Mon Nov 16 14:51:06 1992
- ***************
- *** 1,7 ****
- /* config.c - master MH configuration file */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: config.c,v 1.5 1992/01/24 00:35:28 jromine Exp $";
- ! #endif lint
-
- /* @(MHWARNING) */
-
- --- 1,7 ----
- /* config.c - master MH configuration file */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: config.c,v 1.9 1992/11/05 16:59:39 jromine Exp $";
- ! #endif /* lint */
-
- /* @(MHWARNING) */
-
- ***************
- *** 10,20 ****
- #include "../h/mh.h"
- #ifdef MHRC
- #include <pwd.h>
- ! #endif MHRC
- #include <stdio.h>
-
-
- ! #if defined(__STDC__) && !defined(__HIGHC__)
- #define binpath(file) "@(MHBINPATH)/"#file
- #define etcpath(file) "@(MHETCPATH)/"#file
- #else
- --- 10,20 ----
- #include "../h/mh.h"
- #ifdef MHRC
- #include <pwd.h>
- ! #endif /* MHRC */
- #include <stdio.h>
-
-
- ! #if defined(__STDC__)
- #define binpath(file) "@(MHBINPATH)/"#file
- #define etcpath(file) "@(MHETCPATH)/"#file
- #else
- ***************
- *** 27,37 ****
- @(MHCONFIG)
-
-
- #ifdef MHRC
- #ifdef SYS5
- struct passwd *getpwnam ();
- ! #endif SYS5
- ! #endif MHRC
-
- /* */
-
- --- 27,39 ----
- @(MHCONFIG)
-
-
- + #ifndef __STDC__
- #ifdef MHRC
- #ifdef SYS5
- struct passwd *getpwnam ();
- ! #endif /* SYS5 */
- ! #endif /* MHRC */
- ! #endif
-
- /* */
-
- ***************
- *** 44,54 ****
- #ifdef MHRC
- char *pp;
- struct passwd *pw;
- ! #endif MHRC
-
- #ifdef MHRC
- m_getdefs ();
- ! #endif MHRC
-
- switch (*file) {
- case '/':
- --- 46,56 ----
- #ifdef MHRC
- char *pp;
- struct passwd *pw;
- ! #endif /* MHRC */
-
- #ifdef MHRC
- m_getdefs ();
- ! #endif /* MHRC */
-
- switch (*file) {
- case '/':
- ***************
- *** 57,64 ****
- #ifdef MHRC
- case '~':
- if (cp = index (pp = file + 1, '/'))
- ! *cp++ = NULL;
- ! if (*pp == NULL)
- pp = mypath;
- else
- if (pw = getpwnam (pp))
- --- 59,66 ----
- #ifdef MHRC
- case '~':
- if (cp = index (pp = file + 1, '/'))
- ! *cp++ = '\0';
- ! if (*pp == '\0')
- pp = mypath;
- else
- if (pw = getpwnam (pp))
- ***************
- *** 76,82 ****
- if (access (lpath, 04) != NOTOK)
- return lpath; /* else fall */
- try_it: ;
- ! #endif MHRC
-
- default:
- if (access ((cp = m_mailpath (file)), 04) != NOTOK)
- --- 78,84 ----
- if (access (lpath, 04) != NOTOK)
- return lpath; /* else fall */
- try_it: ;
- ! #endif /* MHRC */
-
- default:
- if (access ((cp = m_mailpath (file)), 04) != NOTOK)
- ***************
- *** 96,102 ****
- struct swit anoyes[] = {
- "no", 0,
- "yes", 0,
- ! NULL, NULL
- };
-
- /* */
- --- 98,104 ----
- struct swit anoyes[] = {
- "no", 0,
- "yes", 0,
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 112,117 ****
- --- 114,120 ----
- char *distcomps = "distcomps";
- char *draft = "draft";
- char *forwcomps = "forwcomps";
- + char *inbox = "inbox";
- char *mh_defaults = etcpath (mh.profile);
- char *mh_profile = ".mh_profile";
- char *mhlformat = "mhl.format";
- ***************
- *** 131,139 ****
- char *context = "context";
- #ifndef NOMHSEQ
- char *mh_seq = ".mh_sequences";
- ! #else NOMHSEQ
- char *mh_seq = NULL;
- ! #endif NOMHSEQ
-
-
- /*
- --- 134,142 ----
- char *context = "context";
- #ifndef NOMHSEQ
- char *mh_seq = ".mh_sequences";
- ! #else /* NOMHSEQ */
- char *mh_seq = NULL;
- ! #endif /* NOMHSEQ */
-
-
- /*
- ***************
- *** 193,201 ****
-
- #ifndef MORE
- char *lproc = "/usr/ucb/more";
- ! #else MORE
- char *lproc = MORE;
- ! #endif MORE
-
-
- /*
- --- 196,204 ----
-
- #ifndef MORE
- char *lproc = "/usr/ucb/more";
- ! #else /* MORE */
- char *lproc = MORE;
- ! #endif /* MORE */
-
-
- /*
- ***************
- *** 211,219 ****
-
- #ifndef MORE
- char *moreproc = "/usr/ucb/more";
- ! #else MORE
- char *moreproc = MORE;
- ! #endif MORE
-
-
- /*
- --- 214,222 ----
-
- #ifndef MORE
- char *moreproc = "/usr/ucb/more";
- ! #else /* MORE */
- char *moreproc = MORE;
- ! #endif /* MORE */
-
-
- /*
- ***************
- *** 248,254 ****
- char *postproc = etcpath (spost);
- #else
- char *postproc = etcpath (post);
- ! #endif BERK
-
-
- /*
- --- 251,257 ----
- char *postproc = etcpath (spost);
- #else
- char *postproc = etcpath (post);
- ! #endif /* BERK */
-
-
- /*
- ***************
- *** 281,289 ****
-
- #ifndef MORE
- char *showproc = "/usr/ucb/more";
- ! #else MORE
- char *showproc = MORE;
- ! #endif MORE
-
-
- /*
- --- 284,292 ----
-
- #ifndef MORE
- char *showproc = "/usr/ucb/more";
- ! #else /* MORE */
- char *showproc = MORE;
- ! #endif /* MORE */
-
-
- /*
- ***************
- *** 347,353 ****
-
- #ifndef FOLDPROT
- #define FOLDPROT "0711"
- ! #endif not FOLDPROT
-
- char *foldprot = FOLDPROT;
-
- --- 350,356 ----
-
- #ifndef FOLDPROT
- #define FOLDPROT "0711"
- ! #endif /* not FOLDPROT */
-
- char *foldprot = FOLDPROT;
-
- ***************
- *** 360,365 ****
-
- #ifndef MSGPROT
- #define MSGPROT "0644"
- ! #endif not MSGPROT
-
- char *msgprot = MSGPROT;
- --- 363,368 ----
-
- #ifndef MSGPROT
- #define MSGPROT "0644"
- ! #endif /* not MSGPROT */
-
- char *msgprot = MSGPROT;
- *** ../mh-6.7.2/conf/config/mts.c Thu Feb 14 15:18:22 1991
- --- conf/config/mts.c Tue Nov 24 10:40:38 1992
- ***************
- *** 1,7 ****
- /* mts.c - definitions for the mail transport system */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mts.c,v 2.7 91/02/14 15:17:56 mh Exp $";
- ! #endif lint
-
- /* LINTLIBRARY */
-
- --- 1,7 ----
- /* mts.c - definitions for the mail transport system */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mts.c,v 2.16 1992/11/24 18:40:34 jromine Exp $";
- ! #endif /* lint */
-
- /* LINTLIBRARY */
-
- ***************
- *** 8,14 ****
- #undef NETWORK
- #if defined(BSD41A) || defined(BSD42) || defined(SOCKETS)
- #define NETWORK
- ! #endif not (defined(BSD41A) || defined(BSD42) || defined(SOCKETS))
-
- #include "../h/strings.h"
- #include <ctype.h>
- --- 8,14 ----
- #undef NETWORK
- #if defined(BSD41A) || defined(BSD42) || defined(SOCKETS)
- #define NETWORK
- ! #endif
-
- #include "../h/strings.h"
- #include <ctype.h>
- ***************
- *** 17,30 ****
- #ifdef NETWORK
- #if defined(BSD42) || defined(SOCKETS)
- #include <netdb.h>
- ! #endif BSD42 or SOCKETS
- ! #else not NETWORK
- #ifndef SYS5
- #include <whoami.h>
- ! #else SYS5
- #include <sys/utsname.h>
- ! #endif SYS5
- ! #endif not NETWORK
- #include <pwd.h>
-
-
- --- 17,30 ----
- #ifdef NETWORK
- #if defined(BSD42) || defined(SOCKETS)
- #include <netdb.h>
- ! #endif
- ! #else /* NETWORK */
- #ifndef SYS5
- #include <whoami.h>
- ! #else
- #include <sys/utsname.h>
- ! #endif /* SYS5 */
- ! #endif /* NETWORK */
- #include <pwd.h>
-
-
- ***************
- *** 35,51 ****
-
- extern int errno;
-
- ! char *tailor_value ();
-
-
- ! #ifdef SYS5
- #define index strchr
- #define rindex strrchr
- ! #endif SYS5
-
- char *index (), *malloc (), *mktemp (), *rindex (), *strcpy ();
-
- struct passwd *getpwuid ();
-
- /* */
-
- --- 35,55 ----
-
- extern int errno;
-
- ! static char *tailor_value ();
-
-
- ! #if defined(SYS5) && !defined(_AIX)
- #define index strchr
- #define rindex strrchr
- ! #endif /* SYS5 */
-
- + #if !defined(__STDC__) && !defined(_AIX) && !defined(_POSIX_SOURCE)
- char *index (), *malloc (), *mktemp (), *rindex (), *strcpy ();
-
- + #ifdef SYS5
- struct passwd *getpwuid ();
- + #endif
- + #endif /* !__STDC__ */
-
- /* */
-
- ***************
- *** 60,69 ****
- static char *mtstailor = "@(MHETCPATH)/mtstailor";
-
- static char *localname = "";
- static char *systemname = "";
- #ifdef MF
- static char *UUCPchan = "";
- ! #endif MF
- char *mmdfldir = "@(MHDROPATH)";
- char *mmdflfil = "@(MHDROPFIL)";
- char *uucpldir = "/usr/spool/mail";
- --- 64,74 ----
- static char *mtstailor = "@(MHETCPATH)/mtstailor";
-
- static char *localname = "";
- + static char *localdomain = "";
- static char *systemname = "";
- #ifdef MF
- static char *UUCPchan = "";
- ! #endif /* MF */
- char *mmdfldir = "@(MHDROPATH)";
- char *mmdflfil = "@(MHDROPFIL)";
- char *uucpldir = "/usr/spool/mail";
- ***************
- *** 80,88 ****
-
- #ifdef MF
- char *umincproc = "@(MHETCPATH)/uminc";
- ! #else MF
- char *umincproc = NULL;
- ! #endif MF
-
-
- int lockstyle = LOK_UNIX;
- --- 85,93 ----
-
- #ifdef MF
- char *umincproc = "@(MHETCPATH)/uminc";
- ! #else /* MF */
- char *umincproc = NULL;
- ! #endif /* MF */
-
-
- int lockstyle = LOK_UNIX;
- ***************
- *** 107,121 ****
- static char *tmpmode = "0600";
- char *Okhosts = "@(MHETCPATH)/Rmail.OkHosts";
- char *Okdests = "@(MHETCPATH)/Rmail.OkDests";
- ! #endif MHMTS
-
- #ifdef MMDFMTS
- ! #endif MMDFMTS
-
- #ifdef SENDMTS
- char *hostable = "@(MHETCPATH)/hosts";
- char *sendmail = "/usr/lib/sendmail";
- ! #endif SENDMTS
-
-
- /* SMTP/POP stuff */
- --- 112,126 ----
- static char *tmpmode = "0600";
- char *Okhosts = "@(MHETCPATH)/Rmail.OkHosts";
- char *Okdests = "@(MHETCPATH)/Rmail.OkDests";
- ! #endif /* MHMTS */
-
- #ifdef MMDFMTS
- ! #endif /* MMDFMTS */
-
- #ifdef SENDMTS
- char *hostable = "@(MHETCPATH)/hosts";
- char *sendmail = "/usr/lib/sendmail";
- ! #endif /* SENDMTS */
-
-
- /* SMTP/POP stuff */
- ***************
- *** 135,141 ****
- char *popbbhost = "";
- char *popbbuser = "";
- char *popbblist = "@(MHETCPATH)/hosts.popbb";
- ! #endif BPOP
-
-
- /* MailDelivery */
- --- 140,146 ----
- char *popbbhost = "";
- char *popbbuser = "";
- char *popbblist = "@(MHETCPATH)/hosts.popbb";
- ! #endif /* BPOP */
-
-
- /* MailDelivery */
- ***************
- *** 158,167 ****
- char **value;
- } binds[] = {
- "localname", &localname,
- "systemname", &systemname,
- #ifdef MF
- "uucpchan", &UUCPchan,
- ! #endif MF
- "mmdfldir", &mmdfldir,
- "mmdflfil", &mmdflfil,
- "uucpldir", &uucpldir,
- --- 163,173 ----
- char **value;
- } binds[] = {
- "localname", &localname,
- + "localdomain", &localdomain,
- "systemname", &systemname,
- #ifdef MF
- "uucpchan", &UUCPchan,
- ! #endif /* MF */
- "mmdfldir", &mmdfldir,
- "mmdflfil", &mmdflfil,
- "uucpldir", &uucpldir,
- ***************
- *** 185,199 ****
- "tmpmode", &tmpmode,
- "okhosts", &Okhosts,
- "okdests", &Okdests,
- ! #endif MHMTS
-
- #ifdef MMDFMTS
- ! #endif MMDFMTS
-
- #ifdef SENDMTS
- "hostable", &hostable,
- "sendmail", &sendmail,
- ! #endif SENDMTS
-
- "servers", &servers,
- "pophost", &pophost,
- --- 191,205 ----
- "tmpmode", &tmpmode,
- "okhosts", &Okhosts,
- "okdests", &Okdests,
- ! #endif /* MHMTS */
-
- #ifdef MMDFMTS
- ! #endif /* MMDFMTS */
-
- #ifdef SENDMTS
- "hostable", &hostable,
- "sendmail", &sendmail,
- ! #endif /* SENDMTS */
-
- "servers", &servers,
- "pophost", &pophost,
- ***************
- *** 204,213 ****
- "popbbhost", &popbbhost,
- "popbbuser", &popbbuser,
- "popbblist", &popbblist,
- ! #endif BPOP
- #ifdef NNTP
- "nntphost", &popbbhost,
- ! #endif NNTP
-
- "maildelivery", &maildelivery,
-
- --- 210,219 ----
- "popbbhost", &popbbhost,
- "popbbuser", &popbbuser,
- "popbblist", &popbblist,
- ! #endif /* BPOP */
- #ifdef NNTP
- "nntphost", &popbbhost,
- ! #endif /* NNTP */
-
- "maildelivery", &maildelivery,
-
- ***************
- *** 240,253 ****
- while (fgets (buffer, sizeof buffer, fp)) {
- if ((cp = index (buffer, '\n')) == NULL)
- break;
- ! *cp = NULL;
- ! if (*buffer == '#' || *buffer == NULL)
- continue;
- if ((bp = index (buffer, ':')) == NULL)
- break;
- ! *bp++ = NULL;
- while (isspace (*bp))
- ! *bp++ = NULL;
-
- for (b = binds; b -> keyword; b++)
- if (strcmp (buffer, b -> keyword) == 0)
- --- 246,259 ----
- while (fgets (buffer, sizeof buffer, fp)) {
- if ((cp = index (buffer, '\n')) == NULL)
- break;
- ! *cp = 0;
- ! if (*buffer == '#' || *buffer == '\0')
- continue;
- if ((bp = index (buffer, ':')) == NULL)
- break;
- ! *bp++ = 0;
- while (isspace (*bp))
- ! *bp++ = 0;
-
- for (b = binds; b -> keyword; b++)
- if (strcmp (buffer, b -> keyword) == 0)
- ***************
- *** 264,270 ****
- #ifdef MHMTS
- Syscpy = atoi (syscpy);
- (void) sscanf (tmpmode, "0%o", &Tmpmode);
- ! #endif MHMTS
- Everyone = atoi (everyone);
- }
-
- --- 270,276 ----
- #ifdef MHMTS
- Syscpy = atoi (syscpy);
- (void) sscanf (tmpmode, "0%o", &Tmpmode);
- ! #endif /* MHMTS */
- Everyone = atoi (everyone);
- }
-
- ***************
- *** 292,298 ****
- grot ('t', '\t');
- #undef grot
-
- ! case NULL: s--;
- case QUOTE:
- *bp = QUOTE;
- break;
- --- 298,304 ----
- grot ('t', '\t');
- #undef grot
-
- ! case 0: s--;
- case QUOTE:
- *bp = QUOTE;
- break;
- ***************
- *** 309,315 ****
- *bp = toascii (i);
- break;
- }
- ! *bp = NULL;
-
- bp = malloc ((unsigned) (strlen (buffer) + 1));
- if (bp != NULL)
- --- 315,321 ----
- *bp = toascii (i);
- break;
- }
- ! *bp = 0;
-
- bp = malloc ((unsigned) (strlen (buffer) + 1));
- if (bp != NULL)
- ***************
- *** 323,335 ****
- char *LocalName () {
- #ifdef BSD41A
- char *myname;
- ! #endif BSD41A
- #if defined(BSD42) || defined(SOCKETS)
- register struct hostent *hp;
- ! #endif BSD42 or SOCKETS
- #if defined(SYS5) && !defined(NETWORK)
- struct utsname name;
- ! #endif SYS5 and not NETWORK
- static char buffer[BUFSIZ] = "";
-
- if (buffer[0])
- --- 329,341 ----
- char *LocalName () {
- #ifdef BSD41A
- char *myname;
- ! #endif /* BSD41A */
- #if defined(BSD42) || defined(SOCKETS)
- register struct hostent *hp;
- ! #endif /* BSD42 or SOCKETS */
- #if defined(SYS5) && !defined(NETWORK)
- struct utsname name;
- ! #endif /* SYS5 and not NETWORK */
- static char buffer[BUFSIZ] = "";
-
- if (buffer[0])
- ***************
- *** 337,347 ****
-
- mts_init ("mts");
- if (*localname)
- ! return strcpy (buffer, localname);
-
- #ifdef locname
- (void) strcpy (buffer, locname);
- ! #else not locname
- #ifdef NETWORK
- #ifdef BSD41A
- myname = "myname";
- --- 343,354 ----
-
- mts_init ("mts");
- if (*localname)
- ! strcpy (buffer, localname);
- ! else {
-
- #ifdef locname
- (void) strcpy (buffer, locname);
- ! #else /* not locname */
- #ifdef NETWORK
- #ifdef BSD41A
- myname = "myname";
- ***************
- *** 351,357 ****
- (void) strcpy (buffer, myname);
- free (myname);
- }
- ! #endif BSD41A
- #if defined(BSD42) || defined(SOCKETS)
- (void) gethostname (buffer, sizeof buffer);
- #ifndef BIND
- --- 358,364 ----
- (void) strcpy (buffer, myname);
- free (myname);
- }
- ! #endif /* BSD41A */
- #if defined(BSD42) || defined(SOCKETS)
- (void) gethostname (buffer, sizeof buffer);
- #ifndef BIND
- ***************
- *** 359,375 ****
- #endif
- if (hp = gethostbyname (buffer))
- (void) strcpy (buffer, hp -> h_name);
- ! #endif BSD42 or SOCKETS
- ! #else not NETWORK
- #ifndef SYS5
- (void) strcpy (buffer, SystemName ());
- ! #else SYS5
- (void) uname (&name);
- (void) strcpy (buffer, name.nodename);
- ! #endif SYS5
- ! #endif not NETWORK
- ! #endif not locname
- !
- return buffer;
- }
-
- --- 366,386 ----
- #endif
- if (hp = gethostbyname (buffer))
- (void) strcpy (buffer, hp -> h_name);
- ! #endif /* BSD42 or SOCKETS */
- ! #else /* not NETWORK */
- #ifndef SYS5
- (void) strcpy (buffer, SystemName ());
- ! #else /* SYS5 */
- (void) uname (&name);
- (void) strcpy (buffer, name.nodename);
- ! #endif /* SYS5 */
- ! #endif /* not NETWORK */
- ! #endif /* not locname */
- ! }
- ! if (*localdomain) {
- ! strcat (buffer, ".");
- ! strcat (buffer, localdomain);
- ! }
- return buffer;
- }
-
- ***************
- *** 378,384 ****
- char *SystemName () {
- #if defined(SYS5) && !defined(NETWORK)
- struct utsname name;
- ! #endif SYS5 and not NETWORK
- static char buffer[BUFSIZ] = "";
-
- if (buffer[0])
- --- 389,395 ----
- char *SystemName () {
- #if defined(SYS5) && !defined(NETWORK)
- struct utsname name;
- ! #endif /* SYS5 and not NETWORK */
- static char buffer[BUFSIZ] = "";
-
- if (buffer[0])
- ***************
- *** 390,405 ****
-
- #ifdef sysname
- (void) strcpy (buffer, sysname);
- ! #else sysname
- #if !defined(SYS5) || defined(NETWORK)
- (void) gethostname (buffer, sizeof buffer);
- ! #else SYS5 and not NETWORK
- #ifdef SYS5
- (void) uname (&name);
- (void) strcpy (buffer, name.nodename);
- ! #endif SYS5
- ! #endif SYS5 and not NETWORK
- ! #endif sysname
-
- return buffer;
- }
- --- 401,416 ----
-
- #ifdef sysname
- (void) strcpy (buffer, sysname);
- ! #else /* sysname */
- #if !defined(SYS5) || defined(NETWORK)
- (void) gethostname (buffer, sizeof buffer);
- ! #else /* SYS5 and not NETWORK */
- #ifdef SYS5
- (void) uname (&name);
- (void) strcpy (buffer, name.nodename);
- ! #endif /* SYS5 */
- ! #endif /* SYS5 and not NETWORK */
- ! #endif /* sysname */
-
- return buffer;
- }
- ***************
- *** 409,419 ****
- char *UucpChan () {
- #ifdef MF
- static char buffer[BUFSIZ] = "";
- ! #endif MF
-
- #ifndef MF
- return NULL;
- ! #else MF
- if (buffer[0])
- return buffer;
-
- --- 420,430 ----
- char *UucpChan () {
- #ifdef MF
- static char buffer[BUFSIZ] = "";
- ! #endif /* MF */
-
- #ifndef MF
- return NULL;
- ! #else /* MF */
- if (buffer[0])
- return buffer;
-
- ***************
- *** 423,433 ****
-
- #ifdef uucpchan
- (void) strcpy (buffer, uucpchan);
- ! #else uucpchan
- (void) strcpy (buffer, "uucp");
- ! #endif uucpchan
- return buffer;
- ! #endif MF
- }
-
- /* */
- --- 434,444 ----
-
- #ifdef uucpchan
- (void) strcpy (buffer, uucpchan);
- ! #else /* uucpchan */
- (void) strcpy (buffer, "uucp");
- ! #endif /* uucpchan */
- return buffer;
- ! #endif /* MF */
- }
-
- /* */
- ***************
- *** 443,449 ****
- if (fp = fopen ("/etc/systemid", "r")) {
- if (fgets (name, len, fp)) {
- if (cp = index (name, '\n'))
- ! *cp = NULL;
- (void) fclose (fp);
- return OK;
- }
- --- 454,460 ----
- if (fp = fopen ("/etc/systemid", "r")) {
- if (fgets (name, len, fp)) {
- if (cp = index (name, '\n'))
- ! *cp = 0;
- (void) fclose (fp);
- return OK;
- }
- ***************
- *** 453,477 ****
-
- return OK;
- }
- ! #endif ALTOS
-
- /* */
-
- ! static char username[BUFSIZ] = "";
- ! static char fullname[BUFSIZ] = "";
-
-
- char *getusr () {
- register char *cp,
- *np;
- register struct passwd *pw;
-
- if (username[0])
- return username;
-
- if ((pw = getpwuid (getuid ())) == NULL
- || pw -> pw_name == NULL
- || *pw -> pw_name == NULL) {
- (void) strcpy (username, "unknown");
- (void) sprintf (fullname, "The Unknown User-ID (%d)", getuid ());
- return username;
- --- 464,501 ----
-
- return OK;
- }
- ! #endif /* ALTOS */
-
- /* */
-
- ! static char username[BUFSIZ];
- ! static char fullname[BUFSIZ];
-
-
- char *getusr () {
- register char *cp,
- *np;
- + #ifdef KPOP
- + int uid;
- + #endif /* KPOP */
- register struct passwd *pw;
-
- if (username[0])
- return username;
-
- + #ifndef KPOP
- if ((pw = getpwuid (getuid ())) == NULL
- || pw -> pw_name == NULL
- || *pw -> pw_name == NULL) {
- + #else /* KPOP */
- + uid = getuid ();
- + if (uid == geteuid () && (cp = getenv ("USER")) != NULL
- + && (pw = getpwnam (cp)) != NULL)
- + strcpy (username, cp);
- + else if ((pw = getpwuid (uid)) == NULL
- + || pw -> pw_name == NULL
- + || *pw -> pw_name == '\0') {
- + #endif /* KPOP */
- (void) strcpy (username, "unknown");
- (void) sprintf (fullname, "The Unknown User-ID (%d)", getuid ());
- return username;
- ***************
- *** 480,494 ****
- np = pw -> pw_gecos;
- for (cp = fullname; *np && *np != (MMailids ? '<' : ','); *cp++ = *np++)
- continue;
- ! *cp = NULL;
- if (MMailids) {
- if (*np)
- np++;
- for (cp = username; *np && *np != '>'; *cp++ = *np++)
- continue;
- ! *cp = NULL;
- }
- ! if (MMailids == 0 || *np == NULL)
- (void) strcpy (username, pw -> pw_name);
-
- if ((cp = getenv ("SIGNATURE")) && *cp)
- --- 504,518 ----
- np = pw -> pw_gecos;
- for (cp = fullname; *np && *np != (MMailids ? '<' : ','); *cp++ = *np++)
- continue;
- ! *cp = '\0';
- if (MMailids) {
- if (*np)
- np++;
- for (cp = username; *np && *np != '>'; *cp++ = *np++)
- continue;
- ! *cp = '\0';
- }
- ! if (MMailids == 0 || *np == '\0')
- (void) strcpy (username, pw -> pw_name);
-
- if ((cp = getenv ("SIGNATURE")) && *cp)
- ***************
- *** 504,510 ****
-
-
- char *getfullname () {
- ! if (username[0] == NULL)
- (void) getusr ();
-
- return fullname;
- --- 528,534 ----
-
-
- char *getfullname () {
- ! if (username[0] == '\0')
- (void) getusr ();
-
- return fullname;
- ***************
- *** 537,543 ****
- return NOTOK;
- }
-
- ! #else notdef
- int dup2 (d1, d2)
- register int d1,
- d2;
- --- 561,567 ----
- return NOTOK;
- }
-
- ! #else /* notdef */
- int dup2 (d1, d2)
- register int d1,
- d2;
- ***************
- *** 569,573 ****
- errno = eindex;
- return i;
- }
- ! #endif notdef
- ! #endif SYS5
- --- 593,597 ----
- errno = eindex;
- return i;
- }
- ! #endif /* notdef */
- ! #endif /* SYS5 */
- *** ../mh-6.7.2/conf/doc/ADMIN.rf Mon Jan 7 16:14:25 1991
- --- conf/doc/ADMIN.rf Wed Oct 28 08:51:22 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: ADMIN.rf,v 2.13 91/01/07 16:14:24 mh Exp $
- .po +.75i
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: ADMIN.rf,v 2.16 1992/05/19 21:48:37 jromine Exp $
- .po +.75i
- ***************
- *** 177,179 ****
- .ti .25i
- ! .b "\\$1"
- .sp
- --- 177,179 ----
- .ti .25i
- ! .b "\\s-2\\$1\\s0"
- .sp
- ***************
- *** 500,502 ****
- For historical reasons, many sites are using port \*(lq109\*(rq
- ! which is the port assigned to the \*(lqPOP\*(rq (ver. 1) protocol.
- The configuration option \*(lqPOPSERVICE\*(rq is the name of the
- --- 500,502 ----
- For historical reasons, many sites are using port \*(lq109\*(rq
- ! which is the port assigned to the \*(lqPOP\*(rq (version 1 and 2) protocol.
- The configuration option \*(lqPOPSERVICE\*(rq is the name of the
- ***************
- *** 587,594 ****
- .pp
- ! These two different philosophies are compatible on the same POP service host:
- ! to selectively disable RPOP for hosts which aren't trusted,
- ! either modify the \fI\&.rhosts\fR file in the case of POP subscribers being
- ! UNIX logins,
- ! or zero the contents of network address field of the \fIpop\fR\0(5) file for
- ! the desired POP subscribers.
- .if t \{
- --- 587,631 ----
- .pp
- ! Authentication for POP subscribers differs
- ! depending on the two methods.
- ! When the user supplies a password for the POP session:
- ! under the first method,
- ! the contents of the password field for the user's entry in the
- ! \fIpasswd\fR\0(5) is consulted;
- ! under the second method,
- ! the contents of the password field for the subscriber's entry in the
- ! \fIpop\fR\0(5) file is consulted.
- ! (To set this field, the \fIpopwrd\fR\0(8) program is used.)
- ! .pp
- ! If you are allowing RPOP,
- ! under the first method,
- ! the user's \fI\&.rhosts\fR file is consulted;
- ! under the second method,
- ! the contents of the network address field for the subscriber's entry
- ! in the \fIpop\fR\0(5) file is consulted.
- ! .pp
- ! In addition,
- ! a third authentication scheme is available.
- ! When the APOP configuration option is given,
- ! e.g.,
- ! .sp
- ! .ti +.5i
- ! options APOP='\*(lq/etc/pop.auth\*(rq'
- ! .sp
- ! In this case,
- ! the server also allows a client to supply authentication
- ! credentials to provide for origin authentication and reply protection,
- ! but which do not involve sending a password in the clear over the network.
- ! A POP authorization DB,
- ! having as its name the value of APOP configuration option,
- ! is used to keep track of this information.
- ! This file is created and manipulated by the \fIpopauth\fR\0(8) program.
- ! Because this file contains secret information,
- ! it must be protected mode 0600 and owned by the super-user.
- ! Hence,
- ! your first step after installing the software is to issue
- ! .sp
- ! .ti +.5i
- ! # popauth -init
- ! .sp
- ! which creates and initalizes the POP authorization DB.
- .if t \{
- ***************
- *** 602,603 ****
- --- 639,641 ----
- .so popaka.me
- + .so popauth.me
- .so popd.me
- *** ../mh-6.7.2/conf/doc/MH.rf Wed Jan 29 14:51:23 1992
- --- conf/doc/MH.rf Wed Dec 2 11:03:24 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: MH.rf,v 1.15 1991/01/25 15:49:34 mh Exp jromine $
- .po +.75i
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: MH.rf,v 1.26 1992/12/02 19:03:15 jromine Exp $
- .po +.75i
- ***************
- *** 768,769 ****
- --- 768,770 ----
- ^Editor:\0/usr/ucb/ex~^\fIcomp, dist, forw, repl\fR
- + ^Inbox:\0inbox~^\fIinc, rmf\fR
- ^Msg\-Protect:\0644~^\fIinc\fR
- ***************
- *** 978,980 ****
- .ti -.25i
- ! .b "\\$1"
- .sp
- --- 979,981 ----
- .ti -.25i
- ! .b "\\s-2\\$1\\s0"
- .sp
- ***************
- *** 1069,1071 ****
- .so dist.me
- - .so fmtdump.me
- .so folder.me
- --- 1070,1071 ----
- ***************
- *** 1076,1078 ****
- --- 1076,1082 ----
- .so mhmail.me
- + @BEGIN: MIME
- + .so mhn.me
- + @END: MIME
- .so mhook.me
- + .so mhparam.me
- .so mhpath.me
- ***************
- *** 1083,1084 ****
- --- 1087,1091 ----
- .so pick.me
- + @BEGIN: MPOP
- + .so popi.me
- + @END: MPOP
- .so prev.me
- ***************
- *** 1093,1094 ****
- --- 1100,1102 ----
- .so show.me
- + .so slocal.me
- .so sortm.me
- ***************
- *** 1129,1132 ****
- .so dp.me
- - .so install-mh.me
- .so fmtdump.me
- .so post.me
- --- 1137,1140 ----
- .so dp.me
- .so fmtdump.me
- + .so install-mh.me
- .so post.me
- ***************
- *** 1337,1339 ****
- Otherwise, \fIprivate\fR sequences are created.
- ! This can be overridden with the `\-public' and `\-private' switches.
- .UH "Sequence Negation"
- --- 1345,1347 ----
- Otherwise, \fIprivate\fR sequences are created.
- ! This can be overridden with the `\-public' and `\-nopublic' switches.
- .UH "Sequence Negation"
- ***************
- *** 2089,2093 ****
- 1. If you can FTP to the ARPA Internet, use anonymous FTP to
- ! ics.uci.edu [128.195.1.1] and retrieve the file pub/mh/mh-6.7.tar.Z.
- This is a tar image after being run through the compress program
- ! (approximately 1.5MB). There should also be a \fBREADME\fR file in
- that directory which tells what the current release of \fIMH\fP
- --- 2097,2101 ----
- 1. If you can FTP to the ARPA Internet, use anonymous FTP to
- ! ics.uci.edu [128.195.1.1] and retrieve the file pub/mh/mh-6.8.tar.Z.
- This is a tar image after being run through the compress program
- ! (approximately 1.8MB). There should also be a \fBREADME\fR file in
- that directory which tells what the current release of \fIMH\fP
- ***************
- *** 2096,2098 ****
- This tar file is also available on louie.udel.edu
- ! [128.175.1.3] in portal/mh-6.7.tar.Z. You may also find MH on
- various other hosts; to make sure you get the latest version and
- --- 2104,2106 ----
- This tar file is also available on louie.udel.edu
- ! [128.175.1.3] in portal/mh-6.8.tar.Z. You may also find MH on
- various other hosts; to make sure you get the latest version and
- *** ../mh-6.7.2/conf/doc/ali.rf Thu Apr 5 16:04:34 1990
- --- conf/doc/ali.rf Mon Feb 10 16:48:04 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: ali.rf,v 1.6 90/04/05 15:09:39 sources Exp $
- .SC ALI 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: ali.rf,v 1.7 1992/02/11 00:47:53 jromine Exp $
- .SC ALI 1
- ***************
- *** 29,31 ****
-
- ! The file specified by the profile entry \*(lqAliasfile:\*(rq and any
- additional alias files given by the `\-alias aliasfile' switch will be read.
- --- 29,31 ----
-
- ! The files specified by the profile entry \*(lqAliasfile:\*(rq and any
- additional alias files given by the `\-alias aliasfile' switch will be read.
- *** ../mh-6.7.2/conf/doc/ap.rf Thu Apr 5 16:04:38 1990
- --- conf/doc/ap.rf Tue May 12 15:23:59 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: ap.rf,v 1.6 90/04/05 15:10:21 sources Exp $
- .SC AP 8
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: ap.rf,v 1.7 1992/05/12 22:23:34 jromine Exp $
- .SC AP 8
- ***************
- *** 4,6 ****
- .NA
- ! ap \- parse addresses 822\-style
- .SY
- --- 4,6 ----
- .NA
- ! ap \- parse addresses 822-style
- .SY
- *** ../mh-6.7.2/conf/doc/bbc.rf Thu Apr 5 16:04:23 1990
- --- conf/doc/bbc.rf Wed Feb 5 13:00:43 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: bbc.rf,v 2.4 90/04/05 15:07:52 sources Exp $
- .SC BBC 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: bbc.rf,v 2.5 1992/02/05 21:00:33 jromine Exp $
- .SC BBC 1
- ***************
- *** 132,135 ****
-
- The `\-rcfile\ rcfile' switch overrides the use of \fI\&.bbrc\fR for
- ! user\-specific BBoards information.
- If the value given to the switch is not absolute,
- --- 132,138 ----
-
- + The \fI\&.bbrc\fR file in the
- + user's \fB$HOME\fR directory
- + is used to keep track of what messages have been read.
- The `\-rcfile\ rcfile' switch overrides the use of \fI\&.bbrc\fR for
- ! this purpose.
- If the value given to the switch is not absolute,
- ***************
- *** 140,143 ****
- and honors it similarly.
- - If this envariable is not set,
- - then the file \fI\&.bbrc\fR in the user's \fB$HOME\fR directory is used.
- .Fi
- --- 143,144 ----
- ***************
- *** 144,146 ****
- ^$HOME/\&.mh\(ruprofile~^The user profile
- ! ^$HOME/\&.bbrc~^BBoard information
- .Pr
- --- 145,147 ----
- ^$HOME/\&.mh\(ruprofile~^The user profile
- ! ^$HOME/\&.bbrc~^BBoard \*(lqcurrent\*(rq message information
- .Pr
- *** ../mh-6.7.2/conf/doc/bbleader.rf Thu Apr 5 16:04:44 1990
- --- conf/doc/bbleader.rf Tue May 12 15:23:54 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: bbleader.rf,v 1.5 90/04/05 15:11:34 sources Exp $
- .SC BBLEADER 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: bbleader.rf,v 1.6 1992/05/12 22:23:34 jromine Exp $
- .SC BBLEADER 1
- ***************
- *** 4,6 ****
- .NA
- ! BBleader \- responsiblities of a BBoard\-leader
- .SY
- --- 4,6 ----
- .NA
- ! BBleader \- responsiblities of an MH BBoard-leader
- .SY
- *** ../mh-6.7.2/conf/doc/comp.rf Mon Dec 17 16:29:37 1990
- --- conf/doc/comp.rf Tue Sep 15 09:58:11 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: comp.rf,v 1.6 90/12/17 16:29:30 mh Exp $
- .SC COMP 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: comp.rf,v 1.6 1990/12/17 16:29:30 mh Exp $
- .SC COMP 1
- *** ../mh-6.7.2/conf/doc/dp.rf Thu Apr 5 16:04:30 1990
- --- conf/doc/dp.rf Tue May 12 15:24:00 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: dp.rf,v 1.6 90/04/05 15:08:58 sources Exp $
- .SC DP 8
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: dp.rf,v 1.7 1992/05/12 22:23:34 jromine Exp $
- .SC DP 8
- ***************
- *** 4,6 ****
- .NA
- ! dp \- parse dates 822\-style
- .SY
- --- 4,6 ----
- .NA
- ! dp \- parse dates 822-style
- .SY
- *** ../mh-6.7.2/conf/doc/fmtdump.rf Fri Jan 25 15:47:32 1991
- --- conf/doc/fmtdump.rf Wed Dec 2 13:48:51 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: fmtdump.rf,v 1.2 91/01/25 15:47:30 mh Exp $
- .SC FMTDUMP 8
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: fmtdump.rf,v 1.6 1992/12/02 21:38:37 jromine Exp $
- .SC FMTDUMP 8
- ***************
- *** 4,8 ****
- .NA
- ! fmtdump \- decode \fIMH\fP format files
- .SY
- ! @(MHETCPATH)/fmtdump formatfile
- .DE
- --- 4,11 ----
- .NA
- ! fmtdump \- decode MH format files
- .SY
- ! @(MHETCPATH)/fmtdump
- ! \%[\-form\ formatfile]
- ! \%[\-format\ string]
- ! \%[\-help]
- .DE
- ***************
- *** 11,14 ****
- interprets the file.
- .Sa
- ! mh-format(8), mh-sequences(8)
- .Co
- --- 14,27 ----
- interprets the file.
- +
- + The `\-format\ string' and `\-form\ formatfile' switches may be used
- + to specify a format string or format file to read.
- + The string is simply a format string and the file is simply a format file.
- + See \fImh-format\fR\|(5) for the details.
- + .Fi
- + ^$HOME/\&.mh\(ruprofile~^The user profile
- + ^@(MHETCPATH)/scan.default~^The default format file
- + .Pr
- + ^Path:~^To determine the user's MH directory
- .Sa
- ! mh-format(5), mh-sequences(8)
- .Co
- *** ../mh-6.7.2/conf/doc/folder.rf Tue Dec 18 14:28:15 1990
- --- conf/doc/folder.rf Thu Oct 29 13:50:31 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: folder.rf,v 1.6 90/12/18 14:28:05 mh Exp $
- .SC FOLDER 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: folder.rf,v 1.11 1992/10/29 21:50:27 jromine Exp $
- .SC FOLDER 1
- ***************
- *** 9,10 ****
- --- 9,12 ----
- \%[\-all]
- + \%[\-print]
- + .\" \%[\-noprint]
- \%[\-fast] \%[\-nofast]
- ***************
- *** 11,13 ****
- \%[\-header] \%[\-noheader]
- - \%[\-pack] \%[\-nopack]
- \%[\-recurse] \%[\-norecurse]
- --- 13,14 ----
- ***************
- *** 14,16 ****
- \%[\-total] \%[\-nototal]
- - \%[\-print] \%[\-noprint]
- \%[\-list] \%[\-nolist]
- --- 15,16 ----
- ***************
- *** 17,18 ****
- --- 17,20 ----
- \%[\-push] \%[\-pop]
- + \%[\-pack] \%[\-nopack]
- + \%[\-verbose] \%[\-noverbose]
- \%[\-help]
- ***************
- *** 24,35 ****
- track of the current folder from day to day.
- -
- When \fIfolder\fR is given the `\-print' switch (the default),
- ! the current folder and/or message may be set,
- ! or all folders may be listed.
- ! When a `+folder' argument is given,
- ! this corresponds to a \*(lqcd\*(rq operation in the \fICShell\fR;
- ! when no `+folder' argument is given,
- ! this corresponds roughly to a \*(lqpwd\*(rq operation in the \fICShell\fR.
- !
- ! \fIFolder\fR will
- list the current folder, the number of messages in it, the
- --- 26,29 ----
- track of the current folder from day to day.
- When \fIfolder\fR is given the `\-print' switch (the default),
- ! \fIfolder\fR will
- list the current folder, the number of messages in it, the
- ***************
- *** 37,39 ****
- the folder, and will flag extra files if they exist.
- ! An example of the output is:
-
- --- 31,33 ----
- the folder, and will flag extra files if they exist.
- ! An example of this summary is:
-
- ***************
- *** 49,54 ****
- become the current folder and/or message.
- Specifying `\-all'
- ! will produce a line for each folder in the user's MH directory,
- ! sorted alphabetically.
- ! These folders are preceded by the read\-only folders,
- which occur as \*(lqatr\-cur\-\*(rq entries in the user's \fIMH\fR context.
- --- 43,72 ----
- become the current folder and/or message.
- + If the specified (or default) folder doesn't exist,
- + the user will be queried as to whether the folder should be created.
- + When standard input is not a tty, the folder is
- + created without any query.
- + (This is the easy way to create an empty folder for use later.)
- +
- + By comparison,
- + when a `+folder' argument is given,
- + this corresponds to a \*(lqcd\*(rq operation in the \fIshell\fR;
- + when no `+folder' argument is given,
- + this corresponds roughly to a \*(lqpwd\*(rq operation in the \fIshell\fR.
- +
- + .\" note - this doesn't work at present
- + .\" If `\-noprint' is specified,
- + .\" a `+folder' and/or `msg' may still be specified
- + .\" to set the current folder and/or message,
- + .\" but the folder summary will not be printed.
- +
- + .Uh "Multiple Folders"
- Specifying `\-all'
- ! will produce a summary line for each top-level
- ! folder in the user's MH directory, sorted alphabetically.
- ! (If \fIfolder\fR
- ! is invoked by a name ending with \*(lqs\*(rq (e.g., \fIfolders\fR\0),
- ! `\-all' is assumed).
- ! Specifying `\-recurse' with `\-all' will also
- ! produce a line for all sub-folders.
- ! These folders are all preceded by the read\-only folders,
- which occur as \*(lqatr\-cur\-\*(rq entries in the user's \fIMH\fR context.
- ***************
- *** 56,57 ****
- --- 74,76 ----
-
- + .ne 9
- .nf
- ***************
- *** 79,85 ****
-
- ! The header is output if either an `\-all' or a `\-header' switch
- is specified; it is suppressed by `\-noheader'.
- - Also, if \fIfolder\fR
- - is invoked by a name ending with \*(lqs\*(rq (e.g., \fIfolders\fR\0),
- - `\-all' is assumed.
- A `\-total' switch will produce only the
- --- 98,101 ----
-
- ! The header is output if either a `\-all' or a `\-header' switch
- is specified; it is suppressed by `\-noheader'.
- A `\-total' switch will produce only the
- ***************
- *** 87,94 ****
-
- - If a `+folder' and/or `msg' is given along with the `\-all' switch,
- - \fIfolder\fR will,
- - in addition to setting the current folder and/or message,
- - list the top\-level folders for the current folder (with `\-norecurse')
- - or list all folders under the current folder recursively (with `\-recurse').
- -
- If `\-fast' is given, only the folder name (or names in the
- --- 103,104 ----
- ***************
- *** 98,104 ****
-
- ! The `\-pack' switch will compress the message names in a folder, removing
- ! holes in message numbering.
-
- ! The `\-recurse' switch will list each folder recursively.
- ! Use of this option effectively defeats the speed enhancement of the `\-fast'
- option,
- --- 108,120 ----
-
- ! If a `+folder'
- ! is given along with the `\-all' switch,
- ! \fIfolder\fR will,
- ! in addition to setting the current folder,
- ! list the top\-level folders for the current folder (with `\-norecurse')
- ! or list all sub-folders under the current folder recursively (with `\-recurse').
- ! In this case, if a `msg' is also supplied,
- ! it will become the current message of `+folder'.
-
- ! The `\-recurse' switch lists each folder recursively, so
- ! use of this option effectively defeats the speed enhancement of the `\-fast'
- option,
- ***************
- *** 107,114 ****
-
- ! If the specified (or default) folder doesn't exist,
- ! the user will be queried as to whether the folder should be created.
- ! When standard input is not a tty, the folder is
- ! created without any query.
- ! (This is the easy way to create an empty folder for use later.)
-
- The `\-push' switch directs \fIfolder\fR to push the current folder onto the
- --- 123,131 ----
-
- ! .Uh "Compacting a Folder"
- ! The `\-pack' switch will compress the message names in the
- ! designated folders, removing holes in message numbering.
- ! The `\-verbose' switch directs \fIfolder\fR to tell the user the general
- ! actions that it is taking to compress the folder.
-
- + .Uh "The Folder Stack"
- The `\-push' switch directs \fIfolder\fR to push the current folder onto the
- ***************
- *** 127,129 ****
- the last occurrence of either one overrides any previous occurrence of the
- ! other.
-
- --- 144,146 ----
- the last occurrence of either one overrides any previous occurrence of the
- ! other. Both of these switches also set `\-list' by default.
-
- ***************
- *** 132,135 ****
- No `+folder' argument is allowed.
- ! After a successful `\-push' or `\-pop', the `\-list' action is taken.
- This corresponds to the \*(lqdirs\*(rq operation in the \fICShell\fR.
- .Fi
- --- 149,155 ----
- No `+folder' argument is allowed.
- ! After a successful `\-push' or `\-pop', the `\-list' action is taken,
- ! unless a `\-nolist' switch follows them on the command line.
- This corresponds to the \*(lqdirs\*(rq operation in the \fICShell\fR.
- + The `\-push', `\-pop', and `\-list' switches turn
- + off `\-print'.
- .Fi
- ***************
- *** 144,147 ****
- ^Folder\-Stack:~^To determine the folder stack
- ! .Ps
- ! ^lsproc:~^Program to list the contents of a folder
- .Sa
- --- 164,167 ----
- ^Folder\-Stack:~^To determine the folder stack
- ! .\" .Ps
- ! .\" ^lsproc:~^Program to list the contents of a folder
- .Sa
- ***************
- *** 163,165 ****
- --- 183,189 ----
- .Ds
- + `\-noverbose'
- + .Ds
- `\-print' is the default if no `\-list', `\-push', or `\-pop' is specified
- + .Ds
- + `\-list' is the default if `\-push', or `\-pop' is specified
- .Co
- ***************
- *** 173,174 ****
- --- 197,200 ----
- then \fIfolder\fR will always change the current folder to that.
- + .Bu
- + `\-all' forces `\-header'.
- .En
- *** ../mh-6.7.2/conf/doc/forw.rf Tue Dec 18 14:40:13 1990
- --- conf/doc/forw.rf Fri Oct 16 14:36:07 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: forw.rf,v 1.10 90/12/18 14:40:06 mh Exp $
- .SC FORW 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: forw.rf,v 1.11 1992/10/16 21:36:02 jromine Exp $
- .SC FORW 1
- ***************
- *** 15,16 ****
- --- 15,19 ----
- \%[\-inplace] \%[\-noinplace]
- + @BEGIN: MIME
- + \%[\-mime] \%[\-nomime]
- + @END: MIME
- \%[\-whatnowproc\ program] \%[\-nowhatnowproc]
- ***************
- *** 121,122 ****
- --- 124,182 ----
-
- + @BEGIN: MIME
- + To use the MIME rules for encapsulation,
- + specify the `\-mime' switch.
- + This directs \fIforw\fR to generate an \fImhn\fR composition file.
- + Note that MH will not invoke \fImhn\fR automatically,
- + unless you add this line to your \&.mh\(ruprofile file:
- + .sp
- + .in +.5i
- + automhnproc: mhn
- + .in -.5i
- + .sp
- + Otherwise,
- + you must specifically give the command
- + .sp
- + .in +.5i
- + What now? edit mhn
- + .in -.5i
- + .sp
- + prior to sending the draft.
- +
- + To automate this somewhat,
- + create a link to \fIprompter\fR called \fIrapid\fR
- + and put these lines in your \&.mh\(ruprofile file:
- + .sp
- + .in +.5i
- + .nf
- + forw: -editor rapid -mime
- + rapid: -rapid
- + rapid-next: mhn
- + .fi
- + .in -.5i
- + .sp
- + Then,
- + you can simply do:
- + .sp
- + .in +.5i
- + .nf
- + \fIforw msgs\fR
- + To: \fImailbox\fR
- + cc:
- + Subject: \fIwhatever\fR
- +
- + --------Enter initial text
- +
- + \fIblah, blah, blah.\fR
- + <CTRL-D>
- + --------
- +
- + What now? \fIedit\fR
- + What now? \fIsend\fR
- + ...
- + .fi
- + .in -.5i
- + .sp
- + The \fIedit\fR command invokes \fImhn\fR automatically.
- +
- + @END: MIME
- The `\-draftfolder\ +folder' and `\-draftmessage\ msg' switches invoke the
- ***************
- *** 191,192 ****
- --- 251,256 ----
- `\-noinplace'
- + @BEGIN: MIME
- + .Ds
- + `\-nomime'
- + @END: MIME
- .Co
- *** ../mh-6.7.2/conf/doc/inc.rf Mon Apr 9 20:22:46 1990
- --- conf/doc/inc.rf Wed May 20 09:24:26 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: inc.rf,v 1.6 90/04/09 20:22:39 sources Exp $
- .SC INC 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: inc.rf,v 1.8 1992/02/04 21:41:21 jromine Exp $
- .SC INC 1
- ***************
- *** 24,27 ****
- \%[\-host\ host] \%[\-user\ user]
- ! \%[\-pack\ file] \%[\-nopack]
- \%[\-rpop] \%[\-norpop]
- @END: POP
- --- 24,28 ----
- \%[\-host\ host] \%[\-user\ user]
- ! \%[\-apop] \%[\-noapop]
- \%[\-rpop] \%[\-norpop]
- + \%[\-pack\ file] \%[\-nopack]
- @END: POP
- ***************
- *** 32,34 ****
- If `+folder' isn't specified,
- ! the folder named \*(lqinbox\*(rq in the user's \fIMH\fR directory will be used.
- The
- --- 33,37 ----
- If `+folder' isn't specified,
- ! a folder in the user's \fIMH\fR directory will be used, either that
- ! specified by the \*(lqInbox:\*(rq entry in the user's profile, or
- ! the folder named \*(lqinbox\*(rq.
- The
- ***************
- *** 124,131 ****
- waiting.
- ! The `\-user\ user' switch may be given to specify the name of the POP
- ! subscriber you wish to check mail for on the POP service host.
- ! The `\-rpop' switch uses the UNIX \fIrPOP\fR
- ! (authentication done via trusted connections).
- ! In contrast, the `\-norpop' switch uses the ARPA \fIPOP\fR
- ! (in which case \fIinc\fR will prompt for a password).
-
- --- 127,141 ----
- waiting.
- ! If the `\-user\ user' switch is not given,
- ! then the current username is used.
- ! Normally,
- ! \fIinc\fR will prompt for a password to use.
- ! However,
- ! if the `\-apop' switch is given,
- ! \fIinc\fR will generate authentication credentials to provide
- ! for origin authentication and replay protection,
- ! but which do not involve sending a password in the clear over the network.
- ! Otherwise,
- ! if the `\-rpop' switch is given,
- ! then \fIinc\fR will try to use a \*(lqtrusted\*(rq connection
- ! (ala the BSD r-commands).
-
- ***************
- *** 148,149 ****
- --- 158,161 ----
- .Ps
- + ^Inbox:~^To determine the inbox, default \*(lqinbox\*(rq
- + .Ps
- ^Folder\-Protect:~^To set mode when creating a new folder
- ***************
- *** 160,162 ****
- .De
- ! `+folder' defaults to \*(lqinbox\*(rq
- .Ds
- --- 172,174 ----
- .De
- ! `+folder' defaulted by \*(lqInbox\*(rq above
- .Ds
- *** ../mh-6.7.2/conf/doc/install-mh.rf Thu Apr 5 16:04:50 1990
- --- conf/doc/install-mh.rf Wed Dec 2 13:38:50 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: install-mh.rf,v 1.5 90/04/05 15:12:44 sources Exp $
- .SC INSTALL-MH 8
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: install-mh.rf,v 1.6 1992/12/02 21:38:49 jromine Exp $
- .SC INSTALL-MH 8
- ***************
- *** 4,6 ****
- .NA
- ! install\-mh \- initialize the MH environment
- .SY
- --- 4,6 ----
- .NA
- ! install-mh \- initialize the MH environment
- .SY
- *** ../mh-6.7.2/conf/doc/maildelivery.5 Thu Oct 29 14:55:12 1987
- --- conf/doc/maildelivery.5 Mon Oct 26 09:02:26 1992
- ***************
- *** 69,71 ****
- the address that was used to mail to you, normally 'yourname' or
- ! 'yourname=string' (see below).
- .II default
- --- 69,71 ----
- the address that was used to mail to you, normally 'yourname' or
- ! \&'yourname=string' (see below).
- .II default
- ***************
- *** 106,108 ****
- went well. An exit status of octal 0300-0377 indicates that a permanent
- ! failure occured and the message should be rejected, these error codes
- are given in mmdf.h. Any other exit
- --- 106,108 ----
- went well. An exit status of octal 0300-0377 indicates that a permanent
- ! failure occured and the message should be rejected; these error codes
- are given in mmdf.h. Any other exit
- ***************
- *** 169,171 ****
- creation mask.
- ! Initgroups is called if 4.2 version of UNIX is running.
- If further requirements are needed, then a shell script
- --- 169,171 ----
- creation mask.
- ! Initgroups is called if the 4.2 version of UNIX is running.
- If further requirements are needed, then a shell script
- ***************
- *** 214,216 ****
- # if the address is jpo=ack \- send an acknowledgement copy back
- ! Addr~~~~jpo=ack~~~~|~~~~R~~~~resend~~\-r~~$(reply-to)
- # anything from steve \- destroy!
- --- 214,216 ----
- # if the address is jpo=ack \- send an acknowledgement copy back
- ! Addr~~~~jpo=ack~~~~|~~~~R~~~~"resend~~\-r~~$(reply-to)"
- # anything from steve \- destroy!
- ***************
- *** 225,227 ****
- $HOME/.maildelivery
- ! \- the files normal location.
- .br
- --- 225,227 ----
- $HOME/.maildelivery
- ! \- the file's normal location.
- .br
- ***************
- *** 237,240 ****
- .sp
- ! This alows interfacing to non-standard mail systems,
- ! ones that don't believe in delimiter-separated mailboxes
- .SH "SEE ALSO"
- --- 237,240 ----
- .sp
- ! This allows interfacing to non-standard mail systems,
- ! ones that don't believe in delimiter-separated mailboxes.
- .SH "SEE ALSO"
- *** ../mh-6.7.2/conf/doc/mark.rf Wed Dec 26 17:03:35 1990
- --- conf/doc/mark.rf Tue Feb 11 16:23:18 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mark.rf,v 1.6 90/12/26 17:03:28 mh Exp $
- .SC MARK 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mark.rf,v 1.7 1992/02/12 00:23:13 jromine Exp $
- .SC MARK 1
- ***************
- *** 72,76 ****
- for the folder and the messages associated with those sequences.
- ! \fIMark\fR will list each sequence named via `\-sequence\ name'
- ! (or all of them if `\-sequence' isn't used),
- ! and the messages associated with that sequence.
- The `\-zero' switch does not affect the operation of `\-list'.
- --- 72,77 ----
- for the folder and the messages associated with those sequences.
- ! \fIMark\fR will list the name of each sequence given by
- ! `\-sequence\ name' and the messages associated with that sequence.
- ! If `\-sequence' isn't used, all sequences will be listed,
- ! with private sequences being so indicated.
- The `\-zero' switch does not affect the operation of `\-list'.
- ***************
- *** 87,89 ****
- Only a certain number of sequences may be defined for a given folder.
- ! This number is usually limited to 10.
-
- --- 88,90 ----
- Only a certain number of sequences may be defined for a given folder.
- ! This number is usually limited to 26 (10 on small systems).
-
- ***************
- *** 102,104 ****
- .Sa
- ! pick (1)
- .De
- --- 103,105 ----
- .Sa
- ! pick (1), mh-sequence (5)
- .De
- ***************
- *** 115,116 ****
- --- 116,121 ----
- If a folder is given, it will become the current folder.
- + .Hh
- + Use \*(lqpick sequence \-list\*(rq
- + to enumerate the messages in a sequence (such as for use
- + by a shell script).
- .En
- *** ../mh-6.7.2/conf/doc/mh-alias.rf Thu Jan 30 11:05:17 1992
- --- conf/doc/mh-alias.rf Fri Dec 11 13:44:29 1992
- ***************
- *** 1,6 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-alias.rf,v 1.8 1992/01/30 19:05:13 jromine Exp $
- ! .SC MH\-ALIAS 5
- .NA
- ! mh\-alias \- alias file for MH message system
- .SY
- --- 1,6 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-alias.rf,v 1.11 1992/12/11 21:44:16 jromine Exp $
- ! .SC MH-ALIAS 5
- .NA
- ! mh-alias \- alias file for MH message system
- .SY
- ***************
- *** 114,115 ****
- --- 114,116 ----
-
- + .ne 10
- \fBExample:\fR
- ***************
- *** 135,136 ****
- --- 136,138 ----
- the three names \*(lqfrated@UCI\*(rq, \*(rqfear\*(rq, and \*(rqfreida\*(rq.
- + .sp
- The alias \*(lqb-people\*(rq is a blind list which includes the
- ***************
- *** 139,140 ****
- --- 141,143 ----
- message header will show only \*(lqBlind List: ;\*(rq (not the addresses).
- + .sp
- Next, the definition of \*(lqUNIX\-committee\*(rq is given by reading
- ***************
- *** 145,146 ****
- --- 148,150 ----
- \fI/etc/passwd\fR is equivalent to the \*(lqwheel\*(rq group.
- + .sp
- Finally, \*(lqeveryone\*(rq is defined as all users with a user\-id in
- ***************
- *** 167,169 ****
- First, in your \fI\&.mh\(ruprofile\fR,
- ! choose a name for your primary alias file, say \*(lqaliases\*(rq,
- and add the line:
- --- 171,173 ----
- First, in your \fI\&.mh\(ruprofile\fR,
- ! choose a name for your alias file, say \*(lqaliases\*(rq,
- and add the line:
- ***************
- *** 220,222 ****
- .Bu
- ! Although the forward\-referencing semantics of \fImh\-alias\fR files prevent
- recursion, the \*(lq<\ alias\-file\*(rq command may defeat this. Since the
- --- 224,226 ----
- .Bu
- ! Although the forward-referencing semantics of \fImh\-alias\fR files prevent
- recursion, the \*(lq<\ alias\-file\*(rq command may defeat this. Since the
- ***************
- *** 225,226 ****
- --- 229,232 ----
- used up.
- + .sp
- + Forward references do not work correctly inside blind lists.
- .En
- *** ../mh-6.7.2/conf/doc/mh-chart.rf Wed Jan 29 14:50:54 1992
- --- conf/doc/mh-chart.rf Wed Nov 11 09:34:16 1992
- ***************
- *** 1,7 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-chart.rf,v 2.11 1992/01/29 22:50:50 jromine Exp $
- .if '\*(ZZ'-man' \{\
- ! .SC MH\-CHART 1
- .NA
- ! mh\-chart \- Chart of \fIMH\fR Commands
- .SY
- --- 1,7 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-chart.rf,v 2.18 1992/11/11 17:34:01 jromine Exp $
- .if '\*(ZZ'-man' \{\
- ! .SC MH-CHART 1
- .NA
- ! mh-chart \- Chart of MH Commands
- .SY
- ***************
- *** 120,124 ****
- .ti .5i
- ! .ne 3
- ! fmtdump
- ! \%[filename]
-
- --- 120,126 ----
- .ti .5i
- ! .ne 4
- ! @(MHETCPATH)/fmtdump
- ! \%[\-form\ formatfile]
- ! \%[\-format\ string]
- ! \%[\-help]
-
- ***************
- *** 153,154 ****
- --- 155,159 ----
- \%[\-inplace] \%[\-noinplace]
- + @BEGIN: MIME
- + \%[\-mime] \%[\-nomime]
- + @END: MIME
- \%[\-whatnowproc\ program] \%[\-nowhatnowproc]
- ***************
- *** 190,193 ****
- \%[\-host\ host] \%[\-user\ user]
- ! \%[\-pack\ file] \%[\-nopack]
- \%[\-rpop] \%[\-norpop]
- @END: POP
- --- 195,199 ----
- \%[\-host\ host] \%[\-user\ user]
- ! \%[\-apop] \%[\-noapop]
- \%[\-rpop] \%[\-norpop]
- + \%[\-pack\ file] \%[\-nopack]
- @END: POP
- ***************
- *** 227,228 ****
- --- 233,235 ----
- \%[\-help]
- + @BEGIN: MIME
-
- ***************
- *** 229,230 ****
- --- 236,267 ----
- .ti .5i
- + .ne 9
- + mhn
- + \%[+folder] \%[msgs] \%[\-part\0number]... \%[\-type\0content]...
- + .br
- + \%[\-list\0\%[\-header]\0\%[\-noheader]
- + .br
- + \%[\-realsize]\0\%[\-norealsize]] \%[-nolist]
- + .br
- + \%[\-show\0\%[\-serialonly]\0\%[\-noserialonly]]
- + .br
- + \%[\-form\0formfile]] \%[\-noshow]
- + .br
- + \%[\-store\0\%[\-auto]\0\%[\-noauto]] \%[\-nostore]
- + .br
- + \%[\-verbose] \%[\-noverbose]
- + \%[\-rfc934mode] \%[\-norfc934mode]
- + \%[\-ebcdic] \%[\-noebcdicsafe]
- + .br
- + \%[\-help]
- + @END: MIME
- +
- + .ti .5i
- + .ne 5
- + mhparam
- + \%[profile-components]
- + \%[\-components] \%[\-nocomponents]
- + \%[\-all]
- + \%[\-help]
- +
- + .ti .5i
- .ne 3
- ***************
- *** 244,245 ****
- --- 281,283 ----
- \%[\-host\ host] \%[\-user\ user]
- + \%[\-apop] \%[\-noapop]
- \%[\-rpop] \%[\-norpop]
- ***************
- *** 304,305 ****
- --- 342,344 ----
- .\}
- + @BEGIN: MPOP
-
- ***************
- *** 306,307 ****
- --- 345,364 ----
- .ti .5i
- + .ne 11
- + popi
- + \%[+folder]
- + \%[\-host\ host] \%[\-user\ user]
- + \%[\-apop] \%[\-noapop]
- + \%[\-rpop] \%[\-norpop]
- + @BEGIN: BPOP
- + \%[\-auto] \%[\-noauto]
- + \%[\-mshproc\ program]
- + @END: BPOP
- + \%[\-form\ formatfile]
- + \%[\-format\ string]
- + \%[\-width\ columns]
- + \%[\-help]
- + @END: MPOP
- +
- +
- + .ti .5i
- .ne 6
- ***************
- *** 403,404 ****
- --- 460,464 ----
- \%[\-forward] \%[\-noforward]
- + @BEGIN: MIME
- + \%[\-mime] \%[\-nomime]
- + @END: MIME
- \%[\-msgid] \%[\-nomsgid]
- ***************
- *** 405,406 ****
- --- 465,469 ----
- \%[\-push] \%[\-nopush]
- + @BEGIN: MIME
- + \%[\-split\ seconds]
- + @END: MIME
- \%[\-verbose] \%[\-noverbose]
- ***************
- *** 507,508 ****
- --- 570,572 ----
- \%[\-compat]
- + @BEGIN: APOP
-
- ***************
- *** 509,510 ****
- --- 573,581 ----
- .ti .5i
- + .ne 3
- + popauth
- + \%[\-init] \%[\-list] \%[\-user\ name]
- + \%[\-help]
- + @END: APOP
- +
- + .ti .5i
- .ne 11
- ***************
- *** 517,518 ****
- --- 588,592 ----
- \%[\-format] \%[\-noformat]
- + @BEGIN: MIME
- + \%[\-mime] \%[\-nomime]
- + @END: MIME
- \%[\-msgid] \%[\-nomsgid]
- ***************
- *** 522,523 ****
- --- 596,611 ----
- file
- + \%[\-help]
- +
- + .ti .5i
- + .ne 10
- + @(MHETCPATH)/slocal \%[address\ info\ sender]
- + \%[\-addr\ address]
- + \%[\-info\ data]
- + \%[\-sender\ sender]
- + \%[\-user\ username]
- + \%[\-mailbox\ mbox]
- + \%[\-file\ file]
- + \%[\-maildelivery\ deliveryfile]
- + \%[\-verbose] \%[\-noverbose]
- + \%[\-debug]
- \%[\-help]
- *** ../mh-6.7.2/conf/doc/mh-format.rf Wed Jan 29 14:57:07 1992
- --- conf/doc/mh-format.rf Wed Dec 2 10:41:53 1992
- ***************
- *** 1,6 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-format.rf,v 1.30 1992/01/29 22:55:31 jromine Exp $
- ! .SC MH\-FORMAT 5
- .NA
- ! mh\-format \- format file for MH message system
- .SY
- --- 1,6 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-format.rf,v 1.43 1992/12/02 18:41:50 jromine Exp $
- ! .SC MH-FORMAT 5
- .NA
- ! mh-format \- format file for MH message system
- .SY
- ***************
- *** 39,41 ****
- There are three types of \fIescape\fR sequences:
- ! header \fIcomponents\fR, built-in \fIfunctions\fR, and, flow \fIcontrol\fR.
-
- --- 39,41 ----
- There are three types of \fIescape\fR sequences:
- ! header \fIcomponents\fR, built-in \fIfunctions\fR, and flow \fIcontrol\fR.
-
- ***************
- *** 101,104 ****
- Next,
- ! all format text up to the corresponding `%>' control
- ! escape (if any) is skipped.
- The `%>' control escape is not interpreted;
- --- 101,104 ----
- Next,
- ! all format text (if any) up to the corresponding `%>' control
- ! escape is skipped.
- The `%>' control escape is not interpreted;
- ***************
- *** 172,173 ****
- --- 172,174 ----
- values 0=false and 1=true.)
- + Control escapes return a \fIboolean\fP value, and set \fInum\fP.
-
- ***************
- *** 179,182 ****
- unless called as part of an argument to another escape sequence.
- ! Function escapes which return a \fIboolean\fR value do pass this value
- ! back to their caller, but will never print out the value.
-
- --- 180,183 ----
- unless called as part of an argument to another escape sequence.
- ! Escapes which return a \fIboolean\fR value do pass this value
- ! back to their caller in \fInum\fP, but will never print out the value.
-
- ***************
- *** 187,188 ****
- --- 188,190 ----
- cur integer message is current
- + .\" unseen integer message is unseen
- size integer size of message
- ***************
- *** 201,202 ****
- --- 203,205 ----
- divide literal integer \fInum\fR divided by \fIarg\fR
- + modulo literal integer \fInum\fR modulo \fIarg\fR
- num literal integer Set \fInum\fR to \fIarg\fR
- ***************
- *** 204,206 ****
- getenv literal string Set \fIstr\fR to environment value of \fIarg\fR
- ! .\" dat literal int ?
- nonzero expr boolean \fInum\fR is non-zero
- --- 207,209 ----
- getenv literal string Set \fIstr\fR to environment value of \fIarg\fR
- ! .\" dat literal int return value of dat[arg]
- nonzero expr boolean \fInum\fR is non-zero
- ***************
- *** 211,213 ****
- comp comp string Set \fIstr\fR to component text
- ! compval comp integer \fInum\fR set to \*(lq\fBatoi\fR(\fIstr\fR\^)\*(rq
- .\" compflag comp integer Set \fInum\fR to component flags bits
- --- 214,216 ----
- comp comp string Set \fIstr\fR to component text
- ! compval comp integer \fInum\fR set to \*(lq\fBatoi\fR(\fIcomp\fR\^)\*(rq
- .\" compflag comp integer Set \fInum\fR to component flags bits
- ***************
- *** 218,219 ****
- --- 221,223 ----
- putnumf expr print \fInum\fR in a fixed width
- + .\" addtoseq literal add msg to sequence (LBL option)
- .re
- ***************
- *** 239,241 ****
- lmonth date string month of the year
- ! year date integer year of the century
- zone date integer timezone in hours
- --- 243,245 ----
- lmonth date string month of the year
- ! year date integer year (may be > 100)
- zone date integer timezone in hours
- ***************
- *** 292,294 ****
-
- ! writes the value of the header component \*(lqFrom:\*(rq to \fIstr\fR;
- then (\fImymbox\fR\^) reads \fIstr\fR
- --- 296,298 ----
-
- ! writes the value of the header component \*(lqFrom:\*(rq to \fIstr\fR\^;
- then (\fImymbox\fR\^) reads \fIstr\fR
- ***************
- *** 342,343 ****
- --- 346,351 ----
-
- + Comments may be inserted in most places where a function argument
- + is not expected. A comment begins with `%;' and ends with
- + a (non-escaped) newline.
- +
- With all this in mind,
- ***************
- *** 348,350 ****
- .ti +.5i
- ! %4(putnumf(msg))%<(cur)+%| %>%<{replied}\-%| %>
-
- --- 356,358 ----
- .ti +.5i
- ! %4(msg)%<(cur)+%| %>%<{replied}\-%?{encrypted}E%| %>
-
- ***************
- *** 353,356 ****
- printed,
- ! and if a \*(lqReplied:\*(rq field is present then a `\-' else a space should
- ! be printed.
- Next:
- --- 361,365 ----
- printed,
- ! and if a \*(lqReplied:\*(rq field is present then a `\-' else
- ! if an \*(lqEncrypted:\*(rq field is present then an `E' otherwise
- ! a space should be printed.
- Next:
- ***************
- *** 358,360 ****
- .ti +.5i
- ! %02(putnumf(mon{date}))/%02(putnumf(mday{date}))
-
- --- 367,369 ----
- .ti +.5i
- ! %02(mon{date})/%02(mday{date})
-
- ***************
- *** 372,374 ****
- .ti +.5i
- ! %<(mymbox{from})To:%14(putstrf(friendly{to}))
-
- --- 381,383 ----
- .ti +.5i
- ! %<(mymbox{from})%<{to}To:%14(friendly{to})%>%>
-
- ***************
- *** 375,376 ****
- --- 384,386 ----
- if the message is from me,
- + and there is a \*(lqTo:\*(rq header,
- print `To:' followed by a \*(lquser-friendly\*(rq rendering of the
- ***************
- *** 380,385 ****
- .ti +.5i
- ! %|%17(putstrf(friendly{from}))%>
-
- ! if the message isn't from me,
- ! then the print the \*(lqFrom:\*(rq address is printed.
- And finally,
- --- 390,396 ----
- .ti +.5i
- ! %<(zero)%17(friendly{from})%>
-
- ! if either of the above two tests failed,
- ! then the \*(lqFrom:\*(rq address is printed
- ! in a \*(lquser-friendly\*(rq format.
- And finally,
- ***************
- *** 395,397 ****
- .ti +.5i
- ! %(lit)%(formataddr %<{reply-to}%|
-
- --- 406,408 ----
- .ti +.5i
- ! %(lit)%(formataddr %<{reply-to}
-
- ***************
- *** 398,400 ****
- This clears \fIstr\fR and formats the \*(lqReply-To:\*(rq header
- ! if present. If not present, the else clause is executed:
-
- --- 409,411 ----
- This clears \fIstr\fR and formats the \*(lqReply-To:\*(rq header
- ! if present. If not present, the else-if clause is executed.
-
- ***************
- *** 401,403 ****
- .ti +.5i
- ! %<{from}%|%<{sender}%|%<{return-path}%>%>%>%>)\\
-
- --- 412,414 ----
- .ti +.5i
- ! %?{from}%?{sender}%?{return-path}%>)\\
-
- ***************
- *** 446,448 ****
- .ti +.5i
- ! %<(nodate{date})%{date}%|%(tws{date})%>."%<{message-id}
- .ti +.5i
- --- 457,459 ----
- .ti +.5i
- ! %<(nodate{date})%{date}%|%(pretty{date})%>."%<{message-id}
- .ti +.5i
- ***************
- *** 456,458 ****
- \*(lqYour message of \*(rq. If the date was parseable, it is
- ! output in official format, otherwise it is output as-is.
- The message-id is included if present.
- --- 467,469 ----
- \*(lqYour message of \*(rq. If the date was parseable, it is
- ! output in a user-friendly format, otherwise it is output as-is.
- The message-id is included if present.
- ***************
- *** 472,474 ****
- else
- ! print (rfc822(date.value))
- endif
- --- 483,485 ----
- else
- ! print (pretty(date.value))
- endif
- *** ../mh-6.7.2/conf/doc/mh-hack.rf Thu Apr 5 16:04:52 1990
- --- conf/doc/mh-hack.rf Tue May 12 15:23:45 1992
- ***************
- *** 1,6 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-hack.rf,v 1.5 90/04/05 15:13:03 sources Exp $
- ! .SC MH\-HACK 8
- .NA
- ! mh\-hack \- how to hack MH
- .SY
- --- 1,6 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-hack.rf,v 1.6 1992/05/12 22:23:34 jromine Exp $
- ! .SC MH-HACK 8
- .NA
- ! mh-hack \- how to hack MH
- .SY
- *** ../mh-6.7.2/conf/doc/mh-mail.rf Thu Apr 5 16:04:52 1990
- --- conf/doc/mh-mail.rf Tue May 12 15:23:47 1992
- ***************
- *** 1,6 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-mail.rf,v 1.5 90/04/05 15:13:12 sources Exp $
- ! .SC MH\-MAIL 5
- .NA
- ! mh\-mail \- message format for MH message system
- .SY
- --- 1,6 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-mail.rf,v 1.6 1992/05/12 22:23:34 jromine Exp $
- ! .SC MH-MAIL 5
- .NA
- ! mh-mail \- message format for MH message system
- .SY
- *** ../mh-6.7.2/conf/doc/mh-mts.rf Wed Nov 21 10:09:34 1990
- --- conf/doc/mh-mts.rf Tue May 12 15:23:48 1992
- ***************
- *** 1,6 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-mts.rf,v 1.7 90/11/21 10:09:32 mh Exp $
- ! .SC MH\-MTS 8
- .NA
- ! mh\-mts \- the MH interface to the message transport system
- .SY
- --- 1,6 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-mts.rf,v 1.10 1992/05/12 22:23:34 jromine Exp $
- ! .SC MH-MTS 8
- .NA
- ! mh-mts \- the MH interface to the message transport system
- .SY
- ***************
- *** 9,10 ****
- --- 9,13 ----
- .ti .5i
- + Zmailer
- +
- + .ti .5i
- MMDF (any release)
- ***************
- *** 24,25 ****
- --- 27,36 ----
- or \fIMH\fR may open a TCP/IP connection to the SMTP server on the localhost.
- +
- + When communicating with \fIzmailer\fP,
- + the \fISendMail\fP compatibility program is
- + required to be installed in /usr/lib.
- + \fIMH\fP communicates with \fIzmailer\fP
- + by using the SMTP.
- + It does this by invoking the \fB/usr/lib/sendmail\fP
- + compatibility program directly, with the `\-bs' option.
-
- *** ../mh-6.7.2/conf/doc/mh-profile.rf Tue Dec 18 12:49:22 1990
- --- conf/doc/mh-profile.rf Wed Dec 2 14:13:43 1992
- ***************
- *** 1,8 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-profile.rf,v 1.8 90/12/18 12:49:13 mh Exp $
- ! .SC MH\-PROFILE 5
- .NA
- ! \&.mh\(ruprofile \- user customization for MH message system
- .SY
- ! any \fIMH\fR command
- .DE
- --- 1,8 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-profile.rf,v 1.19 1992/12/02 22:13:41 jromine Exp $
- ! .SC MH-PROFILE 5
- .NA
- ! mh-profile \- user profile customization for MH message handler
- .SY
- ! \&\fI.mh\(ruprofile\fP
- .DE
- ***************
- *** 42,44 ****
- Keeps track of the current open folder.
- ! (context, default: +inbox)
-
- --- 42,44 ----
- Keeps track of the current open folder.
- ! (context, default: folder specified by \*(lqInbox\*(rq)
-
- ***************
- *** 45,46 ****
- --- 45,52 ----
- .ti -1i
- + Inbox: inbox
- + .br
- + Defines the name of your inbox.
- + (profile, default: inbox)
- +
- + .ti -1i
- Previous\-Sequence:\ pseq
- ***************
- *** 74,77 ****
- Otherwise,
- ! for each name given,
- ! the sequence is first zero'd and then each message is added to the sequence.
- (profile, no default)
- --- 80,82 ----
- Otherwise,
- ! each message is added to each sequence name given.
- (profile, no default)
- ***************
- *** 146,148 ****
- .br
- ! The contents of the folder\-stack for the \fIfolder\fR command.
- (context, no default)
- --- 151,153 ----
- .br
- ! The contents of the folder-stack for the \fIfolder\fR command.
- (context, no default)
- ***************
- *** 154,156 ****
- its other tasks.
- ! \fIMHE\fR is Brian Reid's \fIEmacs\fR front\-end for \fIMH\fR.
- An early version is supplied with the \fImh.6\fR distribution.
- --- 159,161 ----
- its other tasks.
- ! \fIMHE\fR is Brian Reid's \fIEmacs\fR front-end for \fIMH\fR.
- An early version is supplied with the \fImh.6\fR distribution.
- ***************
- *** 158,160 ****
-
- ! .ti \-1i
- Alternate\-Mailboxes: mh@uci\-750a, bug-mh*
- --- 163,165 ----
-
- ! .ti -1i
- Alternate\-Mailboxes: mh@uci\-750a, bug-mh*
- ***************
- *** 173,175 ****
- an asterisk (`*') may appear at either or both ends of the mailbox and host
- ! to indicate wild\-card matching.
- (profile, default: your user-id)
- --- 178,180 ----
- an asterisk (`*') may appear at either or both ends of the mailbox and host
- ! to indicate wild-card matching.
- (profile, default: your user-id)
- ***************
- *** 177,181 ****
- .ti -1i
- ! Aliasfile: aliases
- .br
- ! Indicates a default aliases file for \fIali\fR, \fIwhom\fR, and \fIsend\fR.
- This may be used instead of the `\-alias file' switch.
- --- 182,186 ----
- .ti -1i
- ! Aliasfile: aliases other-alias
- .br
- ! Indicates aliases files for \fIali\fR, \fIwhom\fR, and \fIsend\fR.
- This may be used instead of the `\-alias file' switch.
- ***************
- *** 207,209 ****
- Tells \fIinc\fR your maildrop, if different from the default.
- ! This is superceded by the \fB$MAILDROP\fR envariable.
- (profile, default: @(MHDROPLOC))
- --- 212,214 ----
- Tells \fIinc\fR your maildrop, if different from the default.
- ! This is superceded by the \fBMAILDROP\fR envariable.
- (profile, default: @(MHDROPLOC))
- ***************
- *** 214,218 ****
- Tells \fIsend\fR your mail signature.
- ! This is superceded by the \fB$SIGNATURE\fR envariable.
- On hosts where \fIMH\fR was configured with the UCI option,
- ! if \fB$SIGNATURE\fR is not set and this profile entry is not present,
- the file $HOME/.signature is consulted.
- --- 219,223 ----
- Tells \fIsend\fR your mail signature.
- ! This is superceded by the \fBSIGNATURE\fR envariable.
- On hosts where \fIMH\fR was configured with the UCI option,
- ! if \fBSIGNATURE\fR is not set and this profile entry is not present,
- the file $HOME/.signature is consulted.
- ***************
- *** 253,255 ****
-
- ! If you define the envariable \fB$MH\fR,
- you can specify a profile other than \fI\&.mh\(ruprofile\fR to be read
- --- 258,260 ----
-
- ! If you define the envariable \fBMH\fR,
- you can specify a profile other than \fI\&.mh\(ruprofile\fR to be read
- ***************
- *** 256,258 ****
- by the \fIMH\fR programs that you invoke.
- ! If the value of \fB$MH\fR is not absolute,
- (i.e., does not begin with a \fB/\fR\0),
- --- 261,263 ----
- by the \fIMH\fR programs that you invoke.
- ! If the value of \fBMH\fR is not absolute,
- (i.e., does not begin with a \fB/\fR\0),
- ***************
- *** 259,261 ****
- it will be presumed to start from the current working directory.
- ! This is one of the very few exceptions in \fIMH\fR where non\-absolute
- pathnames are not considered relative to the user's \fIMH\fR directory.
- --- 264,266 ----
- it will be presumed to start from the current working directory.
- ! This is one of the very few exceptions in \fIMH\fR where non-absolute
- pathnames are not considered relative to the user's \fIMH\fR directory.
- ***************
- *** 263,265 ****
- Similarly,
- ! if you define the envariable \fB$MHCONTEXT\fR,
- you can specify a context other than the normal context file
- --- 268,270 ----
- Similarly,
- ! if you define the envariable \fBMHCONTEXT\fR,
- you can specify a context other than the normal context file
- ***************
- *** 267,269 ****
- As always,
- ! unless the value of \fB$MHCONTEXT\fR is absolute,
- it will be presumed to start from your \fIMH\fR directory.
- --- 272,274 ----
- As always,
- ! unless the value of \fBMHCONTEXT\fR is absolute,
- it will be presumed to start from your \fIMH\fR directory.
- ***************
- *** 274,276 ****
- .ti -.5i
- ! \fB$MAILDROP\fR\0: tells \fIinc\fR the default maildrop
- .br
- --- 279,281 ----
- .ti -.5i
- ! \fBMAILDROP\fR\0: tells \fIinc\fR the default maildrop
- .br
- ***************
- *** 279,281 ****
- .ti -.5i
- ! \fB$SIGNATURE\fR\0: tells \fIsend\fR and \fIpost\fR your mail signature
- .br
- --- 284,286 ----
- .ti -.5i
- ! \fBSIGNATURE\fR\0: tells \fIsend\fR and \fIpost\fR your mail signature
- .br
- ***************
- *** 284,286 ****
- .ti -.5i
- ! \fB$HOME\fR\0: tells all \fIMH\fR programs your home directory
-
- --- 289,291 ----
- .ti -.5i
- ! \fBHOME\fR\0: tells all \fIMH\fR programs your home directory
-
- ***************
- *** 287,289 ****
- .ti -.5i
- ! \fB$SHELL\fR\0: tells \fIbbl\fR the default shell to run
-
- --- 292,294 ----
- .ti -.5i
- ! \fBSHELL\fR\0: tells \fIbbl\fR the default shell to run
-
- ***************
- *** 290,296 ****
- .ti -.5i
- ! \fB$TERM\fR\0: tells \fIMH\fR your terminal type
- .br
- ! The \fB$TERMCAP\fR envariable is also consulted.
- In particular,
- ! these tells \fIscan\fR and \fImhl\fR how to clear your terminal,
- and how many columns wide your terminal is.
- --- 295,301 ----
- .ti -.5i
- ! \fBTERM\fR\0: tells \fIMH\fR your terminal type
- .br
- ! The \fBTERMCAP\fR envariable is also consulted.
- In particular,
- ! these tell \fIscan\fR and \fImhl\fR how to clear your terminal,
- and how many columns wide your terminal is.
- ***************
- *** 299,301 ****
- .ti -.5i
- ! \fB$editalt\fR\0: the alternate message
- .br
- --- 304,306 ----
- .ti -.5i
- ! \fBeditalt\fR\0: the alternate message
- .br
- ***************
- *** 302,304 ****
- This is set by \fIdist\fR and \fIrepl\fR during edit sessions
- ! so you can peruse the message being distributed or replied-to.
- The message is also available through a link called \*(lq@\*(rq
- --- 307,309 ----
- This is set by \fIdist\fR and \fIrepl\fR during edit sessions
- ! so you can peruse the message being distributed or replied to.
- The message is also available through a link called \*(lq@\*(rq
- ***************
- *** 308,310 ****
- .ti -.5i
- ! \fB$mhdraft\fR\0: the path to the working draft
- .br
- --- 313,315 ----
- .ti -.5i
- ! \fBmhdraft\fR\0: the path to the working draft
- .br
- ***************
- *** 314,325 ****
- In addition,
- ! \fIdist\fR, \fIforw\fR, and \fIrepl\fR set \fB$mhfolder\fR if appropriate.
- Further,
- ! \fIdist\fR and \fIrepl\fR set \fB$mhaltmsg\fR to tell the
- \fIwhatnowproc\fR about an alternate message associated with the draft
- ! (the message being distributed or replied\-to),
- and
- ! \fIdist\fR sets \fB$mhdist\fR to tell the \fIwhatnowproc\fR that
- ! message re\-distribution is occurring.
- Also,
- ! \fB$mheditor\fR is set to tell the \fIwhatnowproc\fR the user's choice of
- editor (unless overridden by `\-noedit').
- --- 319,330 ----
- In addition,
- ! \fIdist\fR, \fIforw\fR, and \fIrepl\fR set \fBmhfolder\fR if appropriate.
- Further,
- ! \fIdist\fR and \fIrepl\fR set \fBmhaltmsg\fR to tell the
- \fIwhatnowproc\fR about an alternate message associated with the draft
- ! (the message being distributed or replied to),
- and
- ! \fIdist\fR sets \fBmhdist\fR to tell the \fIwhatnowproc\fR that
- ! message re-distribution is occurring.
- Also,
- ! \fBmheditor\fR is set to tell the \fIwhatnowproc\fR the user's choice of
- editor (unless overridden by `\-noedit').
- ***************
- *** 326,332 ****
- Similarly,
- ! \fB$mhuse\fR may be set by \fIcomp\fR.
- Finally,
- ! \fB$mhmessages\fR is set by \fIdist\fR, \fIforw\fR, and \fIrepl\fR
- if annotations are to occur
- ! (along with \fB$mhannotate\fR, and \fB$mhinplace\fR).
- It's amazing all the information that has to get passed via envariables to
- --- 331,337 ----
- Similarly,
- ! \fBmhuse\fR may be set by \fIcomp\fR.
- Finally,
- ! \fBmhmessages\fR is set by \fIdist\fR, \fIforw\fR, and \fIrepl\fR
- if annotations are to occur
- ! (along with \fBmhannotate\fR, and \fBmhinplace\fR).
- It's amazing all the information that has to get passed via envariables to
- ***************
- *** 344,346 ****
- are not given any `msgs' arguments,
- ! then they will default to using the file indicated by \fB$mhdraft\fR.
- This is useful for getting the default behavior supplied by the default
- --- 349,351 ----
- are not given any `msgs' arguments,
- ! then they will default to using the file indicated by \fBmhdraft\fR.
- This is useful for getting the default behavior supplied by the default
- ***************
- *** 349,351 ****
- .ti -.5i
- ! \fB$mhfolder\fR\0: the folder containing the alternate message
- .br
- --- 354,356 ----
- .ti -.5i
- ! \fBmhfolder\fR\0: the folder containing the alternate message
- .br
- ***************
- *** 353,356 ****
- so you can peruse other messages in the current folder
- ! besides the one being distributed or replied-to.
- ! The \fB$mhfolder\fR envariable is also
- set by \fIshow\fR, \fIprev\fR, and \fInext\fR
- --- 358,361 ----
- so you can peruse other messages in the current folder
- ! besides the one being distributed or replied to.
- ! The \fBmhfolder\fR envariable is also
- set by \fIshow\fR, \fIprev\fR, and \fInext\fR
- ***************
- *** 359,363 ****
- .ti -.5i
- ! \fB$MHBBRC\fR\0:
- .br
- ! If you define the envariable \fB$MHBBRC\fR,
- you can specify a BBoards information file other than \fI\&.bbrc\fR to be
- --- 364,368 ----
- .ti -.5i
- ! \fBMHBBRC\fR\0:
- .br
- ! If you define the envariable \fBMHBBRC\fR,
- you can specify a BBoards information file other than \fI\&.bbrc\fR to be
- ***************
- *** 364,366 ****
- read by \fIbbc\fR.
- ! If the value of \fB$MHBBRC\fR is not absolute,
- (i.e., does not begin with a \fB/\fR\0),
- --- 369,371 ----
- read by \fIbbc\fR.
- ! If the value of \fBMHBBRC\fR is not absolute,
- (i.e., does not begin with a \fB/\fR\0),
- ***************
- *** 369,371 ****
- .ti -.5i
- ! \fB$MHFD\fR\0:
- .br
- --- 374,376 ----
- .ti -.5i
- ! \fBMHFD\fR\0:
- .br
- ***************
- *** 374,380 ****
- then if this envariable is set,
- ! \fIMH\fR considers it to be the number of a file\-descriptor which is opened,
- ! read\-only to the \fIMH\fR profile.
- Similarly,
- ! if the envariable \fB$MHCONTEXTFD\fR is set,
- ! this is the number of a file\-descriptor which is opened read\-only
- to the \fIMH\fR context.
- --- 379,385 ----
- then if this envariable is set,
- ! \fIMH\fR considers it to be the number of a file descriptor which is opened,
- ! read-only to the \fIMH\fR profile.
- Similarly,
- ! if the envariable \fBMHCONTEXTFD\fR is set,
- ! this is the number of a file descriptor which is opened read-only
- to the \fIMH\fR context.
- ***************
- *** 382,384 ****
- and is used to examine possible speed improvements for \fIMH\fR startup.
- ! Note that these envariables must be set and non\-empty to enable this feature.
- However,
- --- 387,389 ----
- and is used to examine possible speed improvements for \fIMH\fR startup.
- ! Note that these envariables must be set and non-empty to enable this feature.
- However,
- ***************
- *** 387,389 ****
- this scheme is used.
- ! These file\-descriptors are not closed throughout the execution of the
- \fIMH\fR program,
- --- 392,394 ----
- this scheme is used.
- ! These file descriptors are not closed throughout the execution of the
- \fIMH\fR program,
- ***************
- *** 403,405 ****
- .Sa
- ! mh(1), environ(5)
- .De
- --- 408,410 ----
- .Sa
- ! mh(1), environ(5), mh-sequence(5)
- .De
- ***************
- *** 410,412 ****
- In previous versions of \fIMH\fR,
- ! the current\-message value of a writable folder was kept in a file
- called \*(lqcur\*(rq in the folder itself.
- --- 415,417 ----
- In previous versions of \fIMH\fR,
- ! the current-message value of a writable folder was kept in a file
- called \*(lqcur\*(rq in the folder itself.
- ***************
- *** 413,415 ****
- In \fImh.3\fR,
- ! the \fI\&.mh\(ruprofile\fR contained the current\-message values for
- all folders, regardless of their writability.
- --- 418,420 ----
- In \fImh.3\fR,
- ! the \fI\&.mh\(ruprofile\fR contained the current-message values for
- all folders, regardless of their writability.
- ***************
- *** 476,478 ****
-
- ! In this way, the user can avoid lengthy type\-in to the shell,
- and still give \fIMH\fR commands safely. (Recall that some \fIMH\fR
- --- 481,483 ----
-
- ! In this way, the user can avoid lengthy type-in to the shell,
- and still give \fIMH\fR commands safely. (Recall that some \fIMH\fR
- *** ../mh-6.7.2/conf/doc/mh-sequence.rf Wed Jan 29 15:43:10 1992
- --- conf/doc/mh-sequence.rf Tue May 12 15:23:52 1992
- ***************
- *** 1,6 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-sequence.rf,v 1.9 1991/01/09 11:34:34 mh Exp jromine $
- ! .SC MH\-SEQUENCE 5
- .NA
- ! mh\-sequence \- sequence specification for MH message system
- .SY
- --- 1,6 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-sequence.rf,v 1.11 1992/05/12 22:23:34 jromine Exp $
- ! .SC MH-SEQUENCE 5
- .NA
- ! mh-sequence \- sequence specification for MH message system
- .SY
- *** ../mh-6.7.2/conf/doc/mh-tailor.rf Mon Jan 7 16:13:31 1991
- --- conf/doc/mh-tailor.rf Wed Dec 2 14:16:22 1992
- ***************
- *** 1,10 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-tailor.rf,v 2.11 91/01/07 16:13:27 mh Exp $
- ! .SC MH\-TAILOR 5
- .NA
- ! @(MHETCPATH)/mtstailor \- system customization for MH message system
- .SY
- ! any \fIMH\fR command that interacts with the MTS
- .DE
- ! The file @(MHETCPATH)/mtstailor defines run\-time options for those \fIMH\fR
- programs which interact (in some form) with the message transport system.
- --- 1,11 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh-tailor.rf,v 2.19 1992/12/02 22:16:12 jromine Exp $
- ! .SC MH-TAILOR 5
- .NA
- ! mh-tailor, mtstailor \- system customization for MH message handler
- !
- .SY
- ! \fI@(MHETCPATH)/mtstailor\fP
- .DE
- ! The file @(MHETCPATH)/mtstailor defines run-time options for those \fIMH\fR
- programs which interact (in some form) with the message transport system.
- ***************
- *** 14,15 ****
- --- 15,18 ----
-
- + Each option should be given on a single line. Blank lines
- + and lines which begin with `#' are ignored.
- The options available along with default values and a description of their
- ***************
- *** 29,30 ****
- --- 32,44 ----
- .ti -.5i
- + localdomain:
- + .br
- + If this is set, a `.' followed by this string will be
- + appended to your host name.
- + This might be useful for sites
- + where the host name returned by the system
- + (e.g., <whoami.h>, gethostname, etc.),
- + is not a \*(lqfully qualified domain name\*(rq
- + (i.e., does not contain a `.').
- +
- + .ti -.5i
- systemname:
- ***************
- *** 53,55 ****
- .br
- ! The beginning\-of\-message delimiter for maildrops.
-
- --- 67,69 ----
- .br
- ! The beginning-of-message delimiter for maildrops.
-
- ***************
- *** 58,60 ****
- .br
- ! The end\-of\-message delimiter for maildrops.
-
- --- 72,74 ----
- .br
- ! The end-of-message delimiter for maildrops.
-
- ***************
- *** 75,80 ****
- .br
- ! The locking\-discipline to perform.
- ! A value of \*(lq0\*(rq means to use \fIflock\fR if available,
- ! or \fIlockf\fR if \fBLOCKF\fP was defined when building \fIMH\fP.
- ! On non-\fBBSD42\fP systems,
- standard \fIBellMail\fR locking is used.
- --- 89,95 ----
- .br
- ! The locking discipline to perform.
- ! A value of \*(lq0\*(rq means to use kernel-level locking
- ! if available.
- ! (See below for more details.)
- ! On systems compiled without kernel-level locking,
- standard \fIBellMail\fR locking is used.
- ***************
- *** 89,91 ****
- The name of the directory for making locks.
- ! If your system doesn't have the \fIflock\fR or \fIlockf\fP syscalls,
- then this directory is used when creating locks.
- --- 104,106 ----
- The name of the directory for making locks.
- ! If your system isn't configured to use kernel-level locking,
- then this directory is used when creating locks.
- ***************
- *** 97,99 ****
- .br
- ! The name of the system\-wide default \fI\&.maildelivery\fR file.
- See \fImhook\fR\0(1) for the details.
- --- 112,114 ----
- .br
- ! The name of the system-wide default \fI\&.maildelivery\fR file.
- See \fImhook\fR\0(1) for the details.
- ***************
- *** 103,105 ****
- .br
- ! The highest user\-id which should NOT receive mail addressed to
- \*(lqeveryone\*(rq.
- --- 118,120 ----
- .br
- ! The highest user-id which should NOT receive mail addressed to
- \*(lqeveryone\*(rq.
- ***************
- *** 144,147 ****
- .br
- ! The path to the program that filters \fIUUCP\fR\-style maildrops to
- ! \fIMMDF\fR\-style maildrops.
- .\" @END: MF
- --- 159,162 ----
- .br
- ! The path to the program that filters \fIUUCP\fR\^-style maildrops to
- ! \fIMMDF\fR\^-style maildrops.
- .\" @END: MF
- ***************
- *** 202,204 ****
- .br
- ! A file containing a list of hosts that can sent ARPAnet mail.
-
- --- 217,219 ----
- .br
- ! A file containing a list of hosts that can send ARPAnet mail.
-
- ***************
- *** 226,228 ****
- .br
- ! 2. Words are surrounded by whitespace.
- .br
- --- 241,243 ----
- .br
- ! 2. Words are surrounded by white space.
- .br
- ***************
- *** 309,311 ****
- user.
- ! (The user\-id \*(lqftp\*(rq is highly recommended.)
- This variable should be set on both the POP BBoards client and service hosts.
- --- 324,326 ----
- user.
- ! (The user-id \*(lqftp\*(rq is highly recommended.)
- This variable should be set on both the POP BBoards client and service hosts.
- ***************
- *** 342,348 ****
- the second says where lock files should be created.
- The \*(lqlockstyle\*(rq variable can take on three values: 0, 1, 2.
- ! A value of 0 is useful on \fBBSD42\fP systems.
- ! If you included the \fBLOCKF\fP option when building \fIMH\fP, the
- ! \fIlockf\fP syscall is used, otherwise the \fIflock\fP syscall is used.
- ! If you're not on a 4.2BSD system,
- a locking style of 0 is considered the same as locking style 1.
- --- 357,369 ----
- the second says where lock files should be created.
- +
- The \*(lqlockstyle\*(rq variable can take on three values: 0, 1, 2.
- ! A value of 0 is useful on systems with kernel-level locking.
- ! If you are on a \fBBSD42\fP system, \fIMH\fP assumes
- ! you have the \fIflock\fR system call.
- ! On other systems:
- ! define \fBFLOCK\fP if you want to use the \fIflock\fP system call;
- ! define \fBLOCKF\fP if you want to use the \fIlockf\fP system call;
- ! or define \fBFCNTL\fP if you want to use the \fIfcntl\fP system call
- ! for kernel-level locking.
- ! If you haven't configured \fIMH\fP to use kernel-level locking,
- a locking style of 0 is considered the same as locking style 1.
- ***************
- *** 350,352 ****
- A value of 1 or 2 specifies that a file should be created whose existence
- ! means \*(lqlocked\*(rq and whose non\-existence means \*(lqunlocked\*(rq.
- A value of 1 says to construct the lockname by appending \*(lq.lock\*(rq to
- --- 371,373 ----
- A value of 1 or 2 specifies that a file should be created whose existence
- ! means \*(lqlocked\*(rq and whose non-existence means \*(lqunlocked\*(rq.
- A value of 1 says to construct the lockname by appending \*(lq.lock\*(rq to
- *** ../mh-6.7.2/conf/doc/mh.rf Mon Jan 7 16:56:42 1991
- --- conf/doc/mh.rf Wed Oct 28 09:00:35 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh.rf,v 1.10 91/01/07 16:56:36 mh Exp $
- .if '\*(ZZ'-man' \{\
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mh.rf,v 1.12 1992/10/28 17:00:27 jromine Exp $
- .if '\*(ZZ'-man' \{\
- ***************
- *** 172,173 ****
- --- 172,174 ----
- ^mhook (1)~^\- MH receive\-mail hooks
- + ^mhparam (1)~^\- print MH profile components
- ^mhpath (1)~^\- print full pathnames of MH messages and folders
- ***************
- *** 188,189 ****
- --- 189,191 ----
- ^show (1)~^\- show (list) messages
- + ^slocal (1)~^\- special local mail delivery
- ^sortm (1)~^\- sort messages
- ***************
- *** 206,207 ****
- --- 208,210 ----
- ^dp (8)~^\- parse dates 822\-style
- + ^fmtdump (8)~^\- decode \fIMH\fP format files
- ^install\-mh (8)~^\- initialize the MH environment
- *** ../mh-6.7.2/conf/doc/mhl.rf Thu Apr 5 16:04:38 1990
- --- conf/doc/mhl.rf Fri Dec 4 10:59:24 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mhl.rf,v 1.7 90/04/05 15:10:28 sources Exp $
- .SC MHL 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mhl.rf,v 1.11 1992/12/04 18:59:22 jromine Exp $
- .SC MHL 1
- ***************
- *** 158,159 ****
- --- 158,161 ----
- nosplit flag combine multiple fields into a single field
- + newline flag print newline at end of components (default)
- + nonewline flag don't print newline at end of components
- formatfield string format string for this component (see below)
- ***************
- *** 168,170 ****
- Integer\-valued variables are given decimal values,
- ! while string\-valued variables are given arbirtray text bracketed by
- double\-quotes.
- --- 170,172 ----
- Integer\-valued variables are given decimal values,
- ! while string\-valued variables are given arbitrary text bracketed by
- double\-quotes.
- ***************
- *** 250,251 ****
- --- 252,256 ----
- address parsing is not enabled.
- +
- + The \*(lqnonewline\*(rq option interacts badly
- + with \*(lqcompress\*(rq and \*(lqsplit\*(rq.
- .En
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/doc/mhn.rf Thu Dec 10 15:59:13 1992
- ***************
- *** 0 ****
- --- 1,1025 ----
- + .\" @(MHWARNING)
- + .\" @(#)$Id: mhn.rf,v 1.8 1992/12/10 23:59:10 jromine Exp $
- + .SC MHN 1
- + .NA
- + mhn \- multi-media MH
- + .SY
- + mhn
- + \%[+folder] \%[msgs] \%[\-part\0number]... \%[\-type\0content]...
- + .br
- + \%[\-list\0\%[\-headers]\0\%[\-noheaders]
- + .br
- + \%[\-realsize]\0\%[\-norealsize]] \%[-nolist]
- + .br
- + \%[\-show\0\%[\-serialonly]\0\%[\-noserialonly]]
- + .br
- + \%[\-form\0formfile]] \%[\-noshow]
- + .br
- + \%[\-store\0\%[\-auto]\0\%[\-noauto]] \%[\-nostore]
- + .br
- + \%[\-verbose] \%[\-noverbose]
- + \%[\-rfc934mode] \%[\-norfc934mode]
- + \%[\-ebcdicsafe] \%[\-noebcdicsafe]
- + .br
- + \%[\-help]
- + .DE
- + The \fImhn\fR command manipulates multi-media messages as specified in
- + RFC 1341.
- +
- + Three action switches direct the operation of \fImhn\fR,
- + namely `\-list', `\-show', and `\-store'.
- + Any of these switches may be used concurrently.
- + Normally these action switches will operate on the content of each of the
- + named messages.
- + However,
- + by using the `\-part' and `\-type' switches,
- + the scope of the operation can be focused on particular
- + subparts (of a multipart content) and/or particular content types.
- +
- + A part specification consists of a series of numbers separated by dots.
- + For example,
- + in a multipart content containing three parts,
- + these would be named as 1, 2, and 3, respectively.
- + If part 2 was also a multipart content containing two parts,
- + these would be named as 2.1 and 2.2, respectively.
- + Note that the `\-part' switch is effective for only messages
- + containing a multipart content.
- + If a message has some other kind of content,
- + or if the part is itself another multipart content,
- + the `\-part' switch will not prevent the content from being acted upon.
- +
- + A content specification consists of a content type and a subtype.
- + The initial list of \*(lqstandard\*(rq content types and subtypes can be found
- + in RFC 1341.
- + .ne 18
- + A list of commonly used contents is briefly reproduced here:
- + .sp
- + .nf
- + .in +.5i
- + .ta \w'application 'u
- + Type Subtypes
- + ---- --------
- + text plain, richtext
- + multipart mixed, alternative, digest, parallel
- + message rfc822, partial, external-body
- + application octet-stream, oda, postscript
- + image jpeg, gif, x-pbm, x-pgm, x-ppm, x-xwd
- + audio basic
- + video mpeg
- + .re
- + .in -.5i
- + .fi
- + .sp
- + Subtypes are mandatory.
- + .PP
- + To specify a content,
- + regardless of its subtype,
- + just use the name of the content,
- + e.g.,
- + \*(lqaudio\*(rq.
- + To specify a specific subtype,
- + separate the two with a slash,
- + e.g.,
- + \*(lqaudio/basic\*(rq.
- + Note that regardless of the values given to the `\-type' switch,
- + a multipart content is always acted upon.
- + Further note that if the `\-type' switch is used,
- + and it is desirable to act on a message/external-body content,
- + then the `\-type' switch must be used twice:
- + once for message/external-body and once for the content externally referenced.
- +
- + .Uh "Listing the Contents"
- + The `\-list' switch tells \fImhn\fR to list the table of contents
- + associated with the named messages.
- + The `\-headers' switch indicates that a one-line banner should be
- + displayed above the listing.
- + The `\-realsize' switch tells \fImhn\fR to evaluate the \*(lqnative\*(rq
- + (decoded) format of each content prior to listing.
- + This provides an accurate count at the expense of a small delay.
- +
- + .Uh "Showing the Contents"
- + The `\-show' switch tells \fImhn\fR to display the contents of the named
- + messages.
- + The headers of the message are displayed with the \fImhlproc\fR,
- + using format file \fImhl.headers\fR.
- + (The choice of format file can be overridden by the `\-form\0formfile' switch.)
- +
- + \fImhn\fR will look for information in the user's profile to determine
- + how the different contents should be displayed.
- + This is accomplished by consulting a display string,
- + and executing it under \fB/bin/sh\fR,
- + with the standard input set to the content.
- + .ne 16
- + The display string may contain these escapes:
- + .sp
- + .nf
- + .in +.5i
- + .ta \w'%F 'u
- + %a additional arguments
- + %e exclusive execution
- + %f filename containing content
- + %F %e, %f, and stdin is terminal not content
- + %l display listing prior to displaying content
- + %p %l, and ask for confirmation
- + %s subtype
- + .re
- + .in -.5i
- + .fi
- + .sp
- + For those display strings containing the e- or F-escape,
- + \fImhn\fR will execute at most one of these at any given time.
- + Although the F-escape expands to be the filename containing the content,
- + the e-escape has no expansion as far as the shell is concerned.
- +
- + When the p-escape prompts for confirmation,
- + typing INTR (usually control-C) will tell \fImhn\fR not to display
- + that content.
- + Further,
- + when \fImhn\fR is display a content,
- + typing QUIT (usually control-\\) will tell \fImhn\fR to wrap things up
- + immediately.
- +
- + First,
- + \fImhn\fR will look for an entry of the form:
- + .sp
- + .in +.5i
- + mhn-show-<type>/<subtype>
- + .in -.5i
- + .sp
- + to determine the command to use to display the content.
- + If this isn't found,
- + \fImhn\fR will look for an entry of the form:
- + .sp
- + .in +.5i
- + mhn-show-<type>
- + .in -.5i
- + .sp
- + to determine the display command.
- + .ne 10
- + If this isn't found,
- + \fImhn\fR has two default values:
- + .sp
- + .nf
- + .in +.5i
- + mhn-show-text/plain: %pmoreproc '%F'
- + mhn-show-message/rfc822: %pshow -file '%F'
- + .in -.5i
- + .fi
- + .sp
- + If neither apply,
- + \fImhn\fR will check to see if the message has a application/octet-stream
- + content with parameter \*(lqtype=tar\*(rq.
- + If so,
- + \fImhn\fR will use an appropriate command.
- + If not,
- + \fImhn\fR will complain.
- +
- + .ne 10
- + Example entries might be:
- + .sp
- + .nf
- + .in +.5i
- + mhn-show-audio/basic: raw2audio 2>/dev/null | play
- + mhn-show-image: xv '%f'
- + mhn-show-application/PostScript: lpr -Pps
- + .in -.5i
- + .fi
- + .sp
- + Note that when using the f- or F-escape,
- + it's a good idea to use single-quotes around the escape.
- + This prevents misinterpretation by the shell of any funny characters
- + that might be present in the filename.
- +
- + Because the text content might be in a non-ASCII character set,
- + when \fImhn\fR encounters a \*(lqcharset\*(rq parameter for this content,
- + it checks to see whether the environment variable $MM_CHARSET is set
- + and whether the value of this environment variable is equal to the value of
- + the charset parameter.
- + If not,
- + then
- + \fImhn\fR will look for an entry of the form:
- + .sp
- + .in +.5i
- + mhn-charset-<charset>
- + .in -.5i
- + .sp
- + which should contain a command creating an environment to render the
- + character set.
- + This command string should containing a single \*(lq%s\*(rq,
- + which will be filled-in with the command to display the content.
- +
- + An example entry might be:
- + .sp
- + .in +.5i
- + mhn-charset-iso-8859-1: xterm -fn '-*-*-medium-r-normal-*-*-120-*-*-c-*-iso8859-*' -e %s
- + .in -.5i
- + .sp
- + Note that many pagination programs strip off the high-order bit.
- + However,
- + newer releases of the \fIless\fR program have modest support for
- + single-octet character sets.
- + The source to \fIless\fR version 177,
- + which has such support,
- + is found in the MH source tree under \fBmiscellany/less-177\fR.
- + In order to view messages sent in the ISO 8859/1 character set using
- + \fIless\fR,
- + .ne 9
- + put these lines in your \&.login file:
- + .sp
- + .nf
- + .in +.5i
- + setenv LESSCHARSET latin1
- + setenv LESS "-f"
- + .in -.5i
- + .fi
- + .sp
- + The first line tells \fIless\fR to use 8859/1 definition for determing
- + whether a character is \*(lqnormal\*(rq, \*(lqcontrol\*(lq, or
- + \*(lqbinary\*(rq.
- + The second line tells \fIless\fR not to warn you if it encounters a
- + file that has non-ASCII characters.
- + Then,
- + simply set the \fBmoreproc\fR profile entry to \fIless\fR,
- + and it will get called automatically.
- + (To handle other single-octet character sets,
- + look at the \fIless\fR\0(1) manual entry for information about the
- + \fBLESSCHARDEF\fR environment variable.)
- +
- + Finally,
- + \fImhn\fR will process each message serially\0--\0it won't start showing
- + the next message until all the commands executed to display the
- + current message have terminated.
- + In the case of a multipart content,
- + the content contains advice indicating if the parts should be
- + displayed serially or in parallel.
- + Because this may cause confusion,
- + particularly on uni-window displays,
- + the `\-serialonly' switch can be given to tell \fImhn\fR to never
- + display parts in parallel.
- +
- + .Uh "Storing the Contents"
- + The `\-store' switch tells \fImhn\fR to store the contents of the
- + named messages in \*(lqnative\*(rq (decoded) format.
- + Two things must be determined:
- + the directory to store the content,
- + and the filenames.
- + Files are written in the directory given by the \fBmhn-storage\fR
- + profile entry,
- + e.g.,
- + .sp
- + .in +.5i
- + mhn-storage: /tmp
- + .in -.5i
- + .sp
- + If this entry isn't present,
- + the current working directory is used.
- +
- + \fImhn\fR will look for information in the user's profile to determine
- + how the different contents should be stored.
- + This is achieved through the use of a formatting string,
- + .ne 13
- + which may contain these escapes:
- + .sp
- + .nf
- + .in +.5i
- + .ta \w'%P 'u
- + %m message number
- + %P .part
- + %p part
- + %s subtype
- + .re
- + .in -.5i
- + .fi
- + .sp
- + If the content isn't part of a multipart content,
- + the p-escapes are ignored.
- + Note that if the formatting string starts with a \*(lq+\*(rq character,
- + then these escapes are ignored,
- + and the content is stored in the named folder.
- + (A formatting string consisting solely of a \*(lq+\*(rq character
- + indicates the current folder.)
- + Further,
- + a formatting string consisting solely of a \*(lq-\*(rq character
- + indicates the standard-output.
- +
- + First,
- + \fImhn\fR will look for an entry of the form:
- + .sp
- + .in +.5i
- + mhn-store-<type>/<subtype>
- + .in -.5i
- + .sp
- + to determine the formatting string.
- + If this isn't found,
- + \fImhn\fR will look for an entry of the form:
- + .sp
- + .in +.5i
- + mhn-store-<type>
- + .in -.5i
- + .sp
- + to determine the formatting string.
- + If this isn't found,
- + \fImhn\fR will check to see if the content is application/octet-stream
- + with parameter \*(lqtype=tar\*(rq.
- + If so,
- + \fImhn\fR will choose an appropriate filename.
- + If the content is not application/octet-stream,
- + then \fImhn\fR will check to see if the content is a message.
- + If so,
- + \fImhn\fR will use the value \*(lq+\*(rq.
- + If not,
- + \fImhn\fR will use the value \*(lq%m%P.%s\*(rq.
- +
- + Note that if the formatting string starts with a '/',
- + then content will be stored in the full path given
- + (rather than using the value of \fBmhn-storage\fR or the current working
- + directory.)
- + Similarly,
- + if the formatting string starts with a '|',
- + then \fImhn\fR will execute a command which should ultimately store
- + the content.
- + Note that before executing the command,
- + \fImhn\fR will change to the appropriate directory.
- + Also note that if the formatting string starts with a '|',
- + then \fImhn\fR will also honor the a-escape when processing the
- + formatting string.
- +
- + .ne 10
- + Example entries might be:
- + .sp
- + .nf
- + .in +.5i
- + mhn-store-text: %m%P.txt
- + mhn-store-audio/basic: | raw2audio -e ulaw -s 8000 -c 1 > %m%P.au
- + mhn-store-application/PostScript: %m%P.ps
- + .in -.5i
- + .fi
- + .sp
- + Further,
- + note that when asked to store a content containing a partial message,
- + \fImhn\fR will try to locate all of the portions and combine them accordingly.
- + Thus,
- + if someone's sent you a message in several parts,
- + you might put them all in their own folder and do:
- + .sp
- + .in +.5i
- + mhn all -store
- + .in -.5i
- + .sp
- + This will store exactly one message,
- + containing the sum of the parts.
- + Note that if \fImhn\fR can not locate each part,
- + it will not store anything.
- +
- + Finally,
- + if the `\-auto' switch is given and the content contains information
- + indicating the filename the content should be stored as
- + (and if the filename doesn't begin with a '/'),
- + then the filename from the content will be used instead.
- +
- + .Uh "External Access"
- + For contents of type message/external-body,
- + .ne 12
- + \fImhn\fR supports these access-types:
- + .sp
- + .nf
- + .in +.5i
- + afs
- + anon-ftp
- + ftp
- + local-file
- + mail-server
- + .in -.5i
- + .fi
- + .sp
- + If your system supports a SOCKETs interface to TCP/IP,
- + then \fImhn\fR will use a built-in FTP client.
- + Otherwise,
- + \fImhn\fR will look for the \fBmhn-access-ftp\fR profile entry,
- + e.g.,
- + .sp
- + .in +.5i
- + mhn-access-ftp: myftp.sh
- + .in -.5i
- + .sp
- + to determine the pathname of a program to perform the FTP retrieval.
- + .ne 14
- + This program is invoked with these arguments:
- + .sp
- + .nf
- + .in +.5i
- + domain name of FTP-site
- + username
- + password
- + remote directory
- + remote filename
- + local filename
- + \*(lqascii\*(rq or \*(lqbinary\*(rq
- + .in -.5i
- + .fi
- + .sp
- + The program should terminate with a zero-valued exit-status if the
- + retrieval is success.
- +
- + .Uh "The Content Cache"
- + When \fImhn\fR encounters an external content containing a
- + \*(lqContent-ID:\*(rq field,
- + and if the content allows caching,
- + then \fImhn\fR looks for the profile entry \fBmhn-cache\fR to
- + determine if the content should be read from/written to a cache.
- + Any content written to the cache will,
- + by default,
- + be world-readable.
- + (To prevent this,
- + use a directory name with the desired read and execute permissions.)
- + The \fBmhn-cache\fR profile entry names the directory used for caching,
- + e.g.,
- + .sp
- + .in +.5i
- + mhn-cache: /tmp
- + .in -.5i
- + .sp
- + might be used if you didn't care that the cache got wiped after each reboot
- + of the system.
- +
- + .Uh "Composing the Contents"
- + The \fImhn\fR program can also be used as a simple editor to aid in
- + composing multi-media messages.
- + When invoked by a \fIwhatnow\fR program,
- + \fImhn\fR will expect the body of the draft to be formatted as an
- + \*(lq\fImhn\fR composition file.\*(rq
- +
- + .ne 54
- + The syntax of this is straight-forward:
- + .sp
- + .nf
- + .in +.5i
- + body ::= 1*(content | EOL)
- +
- + content ::= directive | plaintext
- +
- + directive ::= "#" type "/" subtype
- + 0*(";" attribute "=" value)
- + [ "(" comment ")" ]
- + [ "[" description "]" ]
- + [ filename ]
- + EOL
- +
- + | "#@" type "/" subtype
- + 0*(";" attribute "=" value)
- + [ "(" comment ")" ]
- + [ "[" description "]" ]
- + external-parameters
- + EOL
- +
- + | "#forw"
- + [ "[" description "]" ]
- + [ "+"folder ] [ 0*msg ]
- + EOL
- +
- + | "#begin"
- + [ "[" description "]" ]
- + [ "alternative"
- + | "parallel" ]
- + EOL
- + 1*body
- + "#end" EOL
- +
- + plaintext ::= [ "Content-Description:"
- + description EOL EOL ]
- + 1*line
- + [ "#" EOL ]
- +
- + | "#<" type "/" subtype
- + 0*(";" attribute "=" value)
- + [ "(" comment ")" ]
- + [ "[" description "]" ]
- + EOL
- + 1*line
- + [ "#" EOL ]
- +
- + line ::= "##" text EOL
- + -- interpreted as "#"text EOL
- + | text EOL
- + .in -.5i
- + .fi
- + .sp
- + Basically,
- + the body contains one or more contents.
- + A content consists of either a directive,
- + indicated with a \*(lq#\*(rq as the first character of a line;
- + or,
- + plaintext (one or more lines of text).
- + The continuation character, \*(lq\\\*(lq, may be used to enter a single
- + .ne 11
- + directive on more than one line,
- + e.g.,
- + .sp
- + .nf
- + .in +.5i
- + #@application/octet-stream; \\
- + type=tar; \\
- + conversions=x-compress
- + .in -.5i
- + .fi
- + .sp
- + There are four kinds of directives:
- + \*(lqtype\*(rq directives,
- + which name the type and subtype of the content;
- + \*(lqexternal-type\*(rq directives,
- + which also name the type and subtype of the content;
- + the \*(lqforw\*(rq directive,
- + which is used to forward a digest of messages;
- + and,
- + the \*(lqbegin\*(rq directive,
- + which is used to create a multipart content.
- +
- + For the type directives,
- + the user may optionally specify the name of a file containing the
- + contents in \*(lqnative\*(rq (decoded) format.
- + (If the filename starts with the \*(lq|\*(rq character,
- + then this gives a command whose output is captured accordingly.)
- + If a filename is not given,
- + \fImhn\fR will look for information in the user's profile to determine
- + how the different contents should be composed.
- + This is accomplished by consulting a composition string,
- + and executing it under \fB/bin/sh\fR,
- + with the standard output set to the content.
- + .ne 13
- + The composition string may contain these escapes:
- + .sp
- + .nf
- + .in +.5i
- + .ta \w'%P 'u
- + %a additional arguments
- + %f filename containing content
- + %F %f, and stdout is not re-directed
- + %s subtype
- + .re
- + .in -.5i
- + .fi
- + .sp
- + First,
- + \fImhn\fR will look for an entry of the form:
- + .sp
- + .in +.5i
- + mhn-compose-<type>/<subtype>
- + .in -.5i
- + .sp
- + to determine the command to use to compose the content.
- + If this isn't found,
- + \fImhn\fR will look for an entry of the form:
- + .sp
- + .in +.5i
- + mhn-compose-<type>
- + .in -.5i
- + .sp
- + to determine the composition command.
- + If this isn't found,
- + \fImhn\fR will complain.
- +
- + An example entry might be:
- + .sp
- + .in +.5i
- + mhn-compose-audio/basic: record | raw2audio -F
- + .in -.5i
- + .sp
- + Because commands like these will vary,
- + depending on the display environment used for login,
- + composition strings for different contents should probably be put in
- + the file specified by the \fB$MHN\fR environment variable,
- + instead of directly in your user profile.
- +
- + The external-type directives are used to provide a reference to a content,
- + rather than enclosing the contents itself.
- + Hence,
- + instead of providing a filename as with the type directives,
- + external-parameters are supplied.
- + These look like regular parameters,
- + .ne 15
- + so they must be separated accordingly,
- + e.g.,
- + .sp
- + .nf
- + .in +.5i
- + #@application/octet-stream; \\
- + type=tar; \\
- + conversions=x-compress [] \\
- + access-type=anon-ftp; \\
- + name="mh-mime.tar.Z"; \\
- + directory="mrose/mh-mime"; \\
- + site="ftp.ics.uci.edu"
- + .in -.5i
- + .fi
- + .sp
- + By specifying \*(lq[]\*(rq,
- + an empty description string is given,
- + and the start of the external-parameters is identified.
- + .ne 16
- + These parameters are of the form:
- + .sp
- + .nf
- + .in +.5i
- + .ta \w'access-type= 'u
- + access-type= usually \fIanon-ftp\fR or \fImail-server\fR
- + name= filename
- + directory= directoryname (optional)
- + site= hostname
- + mode= usually \fIascii\fR or \fIimage\fR (optional)
- + server= mailbox
- + body= command to send for retrieval
- + .re
- + .in -.5i
- + .fi
- + .sp
- +
- + For the forw directive,
- + the user may optionally specify the name of the folder and which
- + messages are to be forwarded.
- + if a folder is not given,
- + it defaults to the current folder.
- + Similarly,
- + if a message is not given,
- + it defaults to the current message.
- + Hence,
- + the forw directive is similar to the \fIforw\fR\0(1) command,
- + except that the former uses the MIME rules for encapsulation
- + rather than those specified in RFC 934.
- + Usage of the `\-rfc934mode' switch indicates whether \fImhn\fR should
- + attempt to utilize the encapsulation rules in such a way as to appear
- + that RFC 934 is being used.
- + If given,
- + then RFC 934-compliant user-agents should be able to burst the message on
- + reception\0--\0providing that the messages being encapsulated do not
- + contain encapsulated messages themselves.
- + The drawback of this approach is that the encapsulations are generated
- + by placing an extra newline at the end of the body of each message.
- +
- + For the begin directive,
- + the user must specify at least one content between
- + the begin and end pairs.
- +
- + For all of these directives,
- + the user may include a brief description of the content between
- + the \*(lq[\*(rq character and the \*(lq]\*(rq character.
- + Putting this all together,
- + .ne 15
- + here is a brief example of what a user's components file might look like:
- + .sp
- + .nf
- + .in +.5i
- + To:
- + cc:
- + Subject:
- + --------
- + #audio/basic [Flint phone] \\
- + |raw2audio -F < /home/mrose/lib/multi-media/flint.au
- + #image/gif [MTR's photo] \\
- + /home/mrose/lib/multi-media/mrose.gif
- + .in -.5i
- + .fi
- + .sp
- + For a later example,
- + we'll call this components file \fImhncomps\fR.
- +
- + As noted earlier,
- + in addition to directives,
- + plaintext can be present.
- + Plaintext is gathered,
- + until a directive is found or the draft is exhausted,
- + and this is made to form a text content.
- + If the plaintext must contain a \*(lq#\*(rq at the beginning of a line,
- + simply double it,
- + e.g.,
- + .sp
- + .in +.5i
- + ##when sent, this line will start with only one #
- + .in -.5i
- + .sp
- + If you want to end the plaintext prior to a directive,
- + e.g.,
- + to have two plaintext contents adjacent,
- + simply insert a line containing a single \*(lq#\*(rq character,
- + .ne 10
- + e.g.,
- + .sp
- + .nf
- + .in +.5i
- + this is the first content
- + #
- + and this is the second
- + .in -.5i
- + .fi
- + .sp
- + Finally,
- + if the plaintext starts with a line of the form:
- + .sp
- + .in +.5i
- + Content-Description: text
- + .in -.5i
- + .sp
- + then this will be used to describe the plaintext content.
- + \fBNOTE WELL:\fR you must follow this line with a blank line before
- + starting your text.
- +
- + By default,
- + plaintext is captured as a text/plain content.
- + You can override this by starting the plaintext with \*(lq#<\*(rq
- + followed by a content-type specification,
- + .ne 11
- + e.g.,
- + .sp
- + .nf
- + .in +.5i
- + #<text/richtext
- + this content will be tagged as text/richtext
- + #
- + and this content will be tagged as text/plain
- + .in -.5i
- + .fi
- + .sp
- + Note that if you use the \*(lq#<\*(rq plaintext-form,
- + then the content-description must be on the same line which identifies
- + the content type of the plaintext.
- +
- + If \fImhn\fR is successful,
- + it renames the original draft to start with the \*(lq,\*(rq character
- + and end with the string \*(lq.orig\*(rq,
- + e.g.,
- + if you are editing the file \*(lqdraft\*(rq,
- + it will be renamed to \*(lq,draft.orig\*(rq.
- + This allows you to easily recover the \fImhn\fR composition file.
- +
- + .Uh "Automatic Composition"
- + Note that MH will not invoke \fImhn\fR automatically,
- + unless you add this line to your \&.mh\(ruprofile file:
- + .sp
- + .in +.5i
- + automhnproc: mhn
- + .in -.5i
- + .sp
- + Otherwise,
- + you must specifically give the command
- + .sp
- + .in +.5i
- + What now? edit mhn
- + .in -.5i
- + .sp
- + prior to sending the draft.
- +
- + You can easily tailor MH to help you remember to do this.
- + .ne 10
- + Suppose you have these lines in your profile:
- + .sp
- + .nf
- + .in +.5i
- + mcomp: -editor mprompter -form mhncomps
- + mprompter: -noprepend -norapid
- + mprompter-next: mhn
- + .in -.5i
- + .fi
- + .sp
- + where \fImcomp\fR is a link to \fIcomp\fR\0(1),
- + and \fImprompter\fR is a link to \fIprompter\fR\0(1).
- + Then to send a message using the \fImhncomps\fR components file above,
- + .ne 26
- + the sequence is:
- + .sp
- + .nf
- + .in +.5i
- + % \fBmcomp\fR
- + To: \fBuser@host\fR
- + cc:
- + Subject: \fBmulti-media message\fR
- + --------
- + #audio/basic [Flint phone] \\
- + |raw2audio -F < /home/mrose/lib/multi-media/flint.au
- + #image/gif [MTR's photo] \\
- + /home/mrose/lib/multi-media/mrose.gif
- +
- + --------Enter additional text
- +
- + \fBThis message contains three contents.\fR
- + \fB<CTRL-D>\fR
- + --------
- +
- + What now? \fBedit\fR (this invokes \fImhn\fR)
- +
- + What now? \fBsend\fR
- + .in -.5i
- + .fi
- + .sp
- + You have to remember to type the additional edit command,
- + but it should be fairly obvious from the interaction.
- +
- + Finally,
- + you should consider adding this line to your profile:
- + .sp
- + .in +.5i
- + lproc: show
- + .in -.5i
- + .sp
- + This way,
- + if you decide to \fBlist\fR after invoking \fImhn\fR as your editor,
- + the command
- + .sp
- + .in +.5i
- + What now? list
- + .in -.5i
- + .sp
- + will work as you expect.
- +
- + .Uh "Sending Files via Mail"
- + When you want to send a bunch of files to someone,
- + you can run the \fIviamail\fR shell script,
- + which is similar the tarmail command:
- + .sp
- + .in +.5i
- + @(MHETCPATH)/viamail mailpath \*(lqsubject\*(rq files\0...
- + .in -.5i
- + .sp
- + \fIviamail\fR will archive the directories/files you name with \fItar\fR\0(1),
- + and then mail the compressed archive to the `mailpath' with the given
- + `subject'.
- + The archive will be automatically split up into as many messages as
- + necessary in order to get past most mailers.
- +
- + Sometimes you want \fIviamail\fR to pause after posting a partial message.
- + This is usually the case when you are running \fIsendmail\fR and
- + expect to generate a lot of partial messages.
- + If the first argument given to \fIviamail\fR starts with a dash,
- + then it is interpreted as the number of seconds to pause in between postings,
- + e.g.,
- + .sp
- + .in +.5i
- + @(MHETCPATH)/viamail -300 mailpath \*(lqsubject\*(rq files\0...
- + .in -.5i
- + .sp
- + will pause 5 minutes in between each posting.
- +
- + When these messages are received,
- + invoke \fImhn\fR once,
- + with the list of messages,
- + and the `\-store' command.
- + The \fImhn\fR program will then store exactly one message containing the
- + archive.
- + You can then use `\-show' to find out what's inside;
- + possibly followed by `\-store' to write the archive to a file where you
- + .ne 26
- + can subsequently uncompress and untar it, e.g.,
- + .sp
- + .nf
- + .in +.5i
- + % mhn -list all
- + msg part type/subtype size description
- + 1 message/partial 47K part 1 of 4
- + 2 message/partial 47K part 2 of 4
- + 3 message/partial 47K part 3 of 4
- + 4 message/partial 18K part 4 of 4
- + % mhn -store all
- + % mhn -list -verbose last
- + msg part type/subtype size description
- + 5 application/octet-stream 118K
- + (extract with uncompress | tar xvpf -)
- + type=tar
- + conversions=x-compress
- + % mhn -show last
- + msg part type/subtype size description
- + 5 application/octet-stream 118K
- + -- headers of message, followed by \fItar\fR listing appears here
- + % mhn -store last
- + % uncompress < 5.tar.Z | tar xvpf -
- + .in -.5i
- + .fi
- + .sp
- + Alternately,
- + by using the `\-auto' switch,
- + \fImhn\fR will automatically do the extraction for you,
- + .ne 26
- + e.g.,
- + .sp
- + .nf
- + .in +.5i
- + % mhn -list all
- + msg part type/subtype size description
- + 1 message/partial 47K part 1 of 4
- + 2 message/partial 47K part 2 of 4
- + 3 message/partial 47K part 3 of 4
- + 4 message/partial 18K part 4 of 4
- + % mhn -store all
- + % mhn -list -verbose last
- + msg part type/subtype size description
- + 5 application/octet-stream 118K
- + (extract with uncompress | tar xvpf -)
- + type=tar
- + conversions=x-compress
- + % mhn -show last
- + msg part type/subtype size description
- + 5 application/octet-stream 118K
- + -- headers of message, followed by \fItar\fR listing appears here
- + % mhn -store -auto last
- + -- \fItar\fR listing appears here as files are extracted
- + .in -.5i
- + .fi
- + .sp
- + As the second \fItar\fR listing is generated,
- + the files are extracted.
- + A prudent user will never put `\-auto' in the \&.mh\(ruprofile file.
- + The correct procedure is to first use `\-show',
- + to find out what will be extracted.
- + Then \fImhn\fR can be invoked with `\-store' and `\-auto' to perform
- + the extraction.
- +
- + .Uh "User Environment"
- + Because the display environment in which \fImhn\fR operates may vary
- + for a user,
- + \fImhn\fR will look for the environment variable \fB$MHN\fR.
- + If present,
- + this specifies the name of an additional user profile which should be read.
- + Hence,
- + when a user logs in on a particular display device,
- + this environment variable should be set to refer to a file containing
- + definitions useful for the display device.
- + Normally,
- + only entries of the form
- + .sp
- + .in +.5i
- + mhn-show-<type>/<subtype>
- + .br
- + mhn-show-<type>
- + .in -.5i
- + .sp
- + need be present.
- + Finally,
- + \fImhn\fR will attempt to consult one other additional user profile,
- + e.g.,
- + .sp
- + .in +.5i
- + @(MHETCPATH)/mhn_defaults
- + .in -.5i
- + .sp
- + which is created automatically during MH installation.
- + .Fi
- + ^$HOME/\&.mh\(ruprofile~^The user profile
- + ^$MHN~^Additional profile entries
- + ^@(MHETCPATH)/mhn_defaults~^System-default profile entries
- + ^@(MHETCPATH)/mhl.headers~^The headers template
- + .Pr
- + ^Path:~^To determine the user's MH directory
- + .Ps
- + ^Current\-Folder:~^To find the default current folder
- + .Ps
- + ^mhlproc:~^Default program to display message headers
- + .Ps
- + ^mhn-access-ftp:~^Program to retrieve contents via FTP
- + .Ps
- + ^mhn-cache~^Directory to store cached external contents
- + .Ps
- + ^mhn-charset-<charset>~^Template for environment to render character sets
- + .Ps
- + ^mhn-compose-<type>*~^Template for composing contents
- + .Ps
- + ^mhn-show-<type>*~^Template for displaying contents
- + .Ps
- + ^mhn-storage~^Directory to store contents
- + .Ps
- + ^mhn-store-<type>*~^Template for storing contents
- + .Ps
- + ^moreproc:~^Default program to display text/plain content
- + .Sa
- + mhl(1)
- + .br
- + \fIMIME: Mechanisms for Specifying and Describing the Format of
- + Internet Message Bodies\fR
- + (RFC 1341),
- + .br
- + \fIProposed Standard for Message Encapsulation\fR
- + (RFC 934).
- + .De
- + `+folder' defaults to the current folder
- + .Ds
- + `\-noauto'
- + .Ds
- + `\-noebcdicsafe'
- + .Ds
- + `\-form\0mhl.headers'
- + .Ds
- + `\-headers'
- + .Ds
- + `\-realsize'
- + .Ds
- + `\-rfc934mode'
- + .Ds
- + `\-noserialonly'
- + .Ds
- + `\-show'
- + .Ds
- + `\-noverbose'
- + .Co
- + If a folder is given,
- + it will become the current folder.
- + The last message selected will become the current message.
- + .Bu
- + Partial messages contained within a multipart content are not reassembled
- + with the `\-store' switch.
- + .En
- *** ../mh-6.7.2/conf/doc/mhook.rf Thu Apr 5 22:18:47 1990
- --- conf/doc/mhook.rf Thu Oct 29 14:03:51 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mhook.rf,v 1.8 90/04/05 22:18:43 sources Exp $
- .SC MHOOK 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mhook.rf,v 1.15 1992/10/29 22:03:44 jromine Exp $
- .SC MHOOK 1
- ***************
- *** 4,25 ****
- .NA
- ! mhook \- MH receive\-mail hooks
- .SY
- ! $HOME/\&.maildelivery
- ! @BEGIN: MHMTS
- ! .ds SL \fIpost\fR
- ! .ds ZS slocal
- ! @END: MHMTS
- ! @BEGIN: MMDFIMTS
- ! .ds SL \fIslocal\fR
- ! .ds ZS slocal
- ! @END: MMDFIMTS
- ! @BEGIN: MMDFIIMTS
- ! .ds SL the local channel
- ! .ds ZS mmdfII
- ! @END: MMDFIIMTS
- ! @BEGIN: SENDMTS
- ! .ds SL \fIslocal\fR
- ! .ds ZS slocal
- ! @END: SENDMTS
- !
- .ti .5i
- --- 4,8 ----
- .NA
- ! mhook, rcvdist, rcvpack, rcvtty \- MH receive-mail hooks
- .SY
- ! .na
- .ti .5i
- ***************
- *** 45,46 ****
- --- 28,30 ----
- \%[\-help]
- + .ad
- .DE
- ***************
- *** 49,287 ****
- You do \fBNOT\fR invoke the hook yourself,
- ! @BEGIN: MHMTS
- ! rather the hook is invoked on your behalf by \fIMH\fR.
- ! @END: MHMTS
- ! @BEGIN: MMDFIMTS
- ! rather the hook is invoked on your behalf by \fIMMDF\fR
- ! when you (symbolically) link @(MHETCPATH)/slocal to the file
- ! bin/rcvmail in your home directory.
- ! @END: MMDFIMTS
- ! @BEGIN: MMDFIIMTS
- ! rather the hook is invoked on your behalf by \fIMMDF\fR.
- ! @END: MMDFIIMTS
- ! @BEGIN: SENDMTS
- ! rather the hook is invoked on your behalf by \fISendMail\fR,
- ! when you include the line
- ! .nf
- ! .in +.5i
- ! \*(lq| @(MHETCPATH)/slocal -user $USER\*(rq
- ! .in -.5i
- ! .fi
- ! in your \&.forward file in your home directory.
- ! @END: SENDMTS
-
- ! The \fI\&.maildelivery\fR file,
- ! which is an ordinary ASCII file,
- ! controls how local delivery is performed.
- ! This file is read by \*(SL.
- ! .if '\*(ZS'slocal' \{\
- !
- ! The format of each line in the \fI\&.maildelivery\fR file is
- !
- ! .ti +.5i
- ! \fBfield pattern action result string\fR
- !
- ! where
- !
- ! .in +.5i
- ! .ti -.25i
- ! \fBfield\fR:
- ! .br
- ! The name of a field that is to be searched for a pattern.
- ! This is any field in the headers of the message that might be present.
- ! In addition, the following special fields are also defined:
- ! .in +.25i
- ! \fIsource\fR: the out\-of\-band sender information
- ! .br
- ! \fIaddr\fR: the address that was used to cause delivery to the recipient
- ! .br
- ! \fIdefault\fR: this matches \fIonly\fR if the message hasn't been delivered yet
- ! .br
- ! \fI*\fR: this always matches
- ! .in -.25i
- !
- ! .ti -.25i
- ! \fBpattern\fR:
- ! .br
- ! The sequence of characters to match in the specified field.
- ! Matching is case\-insensitive but not RE\-based.
- !
- ! .ti -.25i
- ! \fBaction\fR:
- ! .br
- ! The action to take to deliver the message.
- ! This is one of
- !
- ! .in +.5i
- ! .ti -.5i
- ! \fIfile\fR or \fI>\fR:
- ! .br
- ! Append the message to the file named by \fBstring\fR.
- ! The standard maildrop delivery process is used.
- ! If the message can be appended to the file,
- ! then this action succeeds.
- !
- ! When writing to the file,
- ! a new field is added:
- !
- ! .ti +.5i
- ! Delivery\-Date:\ date
- !
- ! which indicates the date and time that message was appended to the file.
- !
- ! .ti -.5i
- ! \fIpipe\fR or \fI|\fR:
- ! .br
- ! Pipe the message as the standard input to the command named by \fBstring\fR,
- ! using the Bourne shell \fIsh\fR\0(1) to interpret the string.
- ! Prior to giving the string to the shell,
- ! it is expanded with the following built\-in variables:
- ! .in +.25i
- ! $(sender): the return address for the message
- ! .br
- ! $(address): the address that was used to cause delivery to the recipient
- ! .br
- ! $(size): the size of the message in bytes
- ! .br
- ! $(reply\-to): either the \*(lqReply\-To:\*(rq or \*(lqFrom:\*(rq field
- ! of the message
- ! .br
- ! $(info): miscellaneous out\-of\-band information
- ! .in -.25i
- !
- ! When a process is invoked, its environment is:
- ! the user/group id:s are set to recipient's id:s;
- ! the working directory is the recipient's directory;
- ! the umask is 0077;
- ! the process has no /dev/tty;
- ! the standard input is set to the message;
- ! the standard output and diagnostic output are set to /dev/null;
- ! all other file\-descriptors are closed;
- ! the envariables \fB$USER\fR, \fB$HOME\fR, \fB$SHELL\fR are set
- ! appropriately,
- ! and no other envariables exist.
- !
- ! The process is given a certain amount of time to execute.
- ! If the process does not exit within this limit,
- ! the process will be terminated with extreme prejudice.
- ! The amount of time is calculated as ((size x 60) + 300) seconds,
- ! where size is the number of bytes in the message.
- !
- ! The exit status of the process is consulted in determining the success of the
- ! action.
- ! An exit status of zero means that the action succeeded.
- ! Any other exit status (or abnormal termination) means that the action failed.
- !
- ! In order to avoid any time limitations,
- ! you might implement a process that began by \fIforking\fR.
- ! The parent would return the appropriate value immediately,
- ! and the child could continue on,
- ! doing whatever it wanted for as long as it wanted.
- ! This approach is somewhat risky if the parent is going to return an
- ! exit status of zero.
- ! If the parent is going to return a non\-zero exit status,
- ! then this approach can lead to quicker delivery into your maildrop.
- !
- ! .ti -.5i
- ! \fIqpipe\fR or \fI<caret>\fR:
- ! .br
- ! Similar to \fIpipe\fR,
- ! but executes the command directly,
- ! after built\-in variable expansion,
- ! without assistance from the shell.
- !
- ! .ti -.5i
- ! \fIdestroy\fR:
- ! .br
- ! This action always succeeds.
- ! .in -.5i
- !
- ! .ti -.25i
- ! \fBresult\fR:
- ! .br
- ! Indicates how the action should be performed:
- !
- ! .in +.5i
- ! .ti -.5i
- ! \fIA\fR:
- ! .br
- ! Perform the action.
- ! If the action succeeds, then the message is considered delivered.
- !
- ! .ti -.5i
- ! \fIR\fR:
- ! .br
- ! Perform the action.
- ! Regardless of the outcome of the action,
- ! the message is not considered delivered.
- !
- ! .ti -.5i
- ! \fI?\fR:
- ! .br
- ! Perform the action only if the message has not been delivered.
- ! If the action succeeds, then the message is considered delivered.
- !
- ! .ti -.5i
- ! \fIN\fR:
- ! .br
- ! Perform the action only if the message has not been delivered
- ! and the previous action succeeded.
- ! If this action succeeds, then the message is considered delivered.
- ! .in -.5i
- ! .in -.5i
- !
- ! The file is always read completely,
- ! so that several matches can be made and several actions can be taken.
- ! The \fI\&.maildelivery\fR file must be owned either by the user or by root,
- ! and must be writable only by the owner.
- ! If the \fI\&.maildelivery\fR file can not be found,
- ! or does not perform an action which delivers the message,
- ! then the file @(MHETCPATH)/maildelivery is read according to the same rules.
- ! This file must be owned by the root and must be writable only by the root.
- ! If this file can not be found
- ! or does not perform an action which delivers the message,
- ! then standard delivery to the user's maildrop, @(MHDROPLOC), is performed.
- !
- ! Arguments in the \fI\&.maildelivery\fR file are separated by white\-space or
- ! comma.
- ! Since double\-quotes are honored,
- ! these characters may be included in a single argument by enclosing the
- ! entire argument in double\-quotes.
- ! A double\-quote can be included by preceeding it with a backslash.
- !
- ! To summarize, here's an example:
- !
- ! .nf
- ! .in +.5i
- ! .ta \w'default 'u +\w'uk-mmdf-workers 'u +\w'action 'u +\w'result 'u
- ! #\fIfield\fR \fIpattern\fR \fIaction\fR \fIresult\fR \fIstring\fR
- ! # lines starting with a '#' are ignored, as are blank lines
- ! #
- ! # file mail with mmdf2 in the \*(lqTo:\*(rq line into file mmdf2.log
- ! To mmdf2 file A mmdf2.log
- ! # Messages from mmdf pipe to the program err-message-archive
- ! From mmdf pipe A err-message-archive
- ! # Anything with the \*(lqSender:\*(rq address \*(lquk-mmdf-workers\*(rq
- ! # file in mmdf2.log if not filed already
- ! Sender uk-mmdf-workers file ? mmdf2.log
- ! # \*(lqTo:\*(rq unix \- put in file unix-news
- ! To Unix > A unix-news
- ! # if the address is jpo=mmdf \- pipe into mmdf-redist
- ! addr jpo=mmdf | A mmdf-redist
- ! # if the address is jpo=ack \- send an acknowledgement copy back
- ! addr jpo=ack | R \*(lqresend\0\-r\0$(reply-to)\*(rq
- ! # anything from steve \- destroy!
- ! From steve destroy A \-
- ! # anything not matched yet \- put into mailbox
- ! default \- > ? mailbox
- ! # always run rcvalert
- ! * \- | R rcvalert
- ! .re
- ! .in -.5i
- ! .fi
- ! .\}
- ! .if '\*(ZS'mmdfII' \{\
- ! See \fImaildelivery\fR\0(5) for the details.
- ! .\}
- !
- ! Four programs are currently standardly available,
- \fIrcvdist\fR (redistribute incoming messages to additional recipients),
- --- 33,39 ----
- You do \fBNOT\fR invoke the hook yourself,
- ! rather the hook is invoked on your behalf by your
- ! system's Message Transport Agent. See \fIslocal\fP\0(1)
- ! for details on how to activate receive\-mail hooks on your system.
-
- ! Four programs are currently available as part of \fIMH\fP,
- \fIrcvdist\fR (redistribute incoming messages to additional recipients),
- ***************
- *** 299,301 ****
- on its command line.
- ! Its use is obsoleted by the \fI\&.maildelivery\fR.
-
- --- 51,53 ----
- on its command line.
- ! Its use is obsoleted by the \*(lqfile\*(rq action of \fIslocal\fR.
-
- ***************
- *** 315,316 ****
- --- 67,81 ----
-
- + In addition to the standard \fImh\-format\fR\0(5) escapes,
- + \fIrcvtty\fR also recognizes the following additional \fIcomponent\fR escapes:
- + .sp 1
- + .ne 5
- + .nf
- + .ta \w'Dtimenow 'u +\w'Returns 'u
- + \fIEscape\fR \fIReturns\fR \fIDescription\fR
- + body string the (compressed) first part of the body
- + dtimenow date the current date
- + folder string the name of the current folder
- + .re
- + .fi
- +
- Normally, \fIrcvtty\fP obeys
- ***************
- *** 318,320 ****
- With the `\-biff' option, \fIrcvtty\fP will obey the notification
- ! status set by \fIbiff\fP\0(1).
- If the terminal access daemon (TTYD) is available on your system,
- --- 83,85 ----
- With the `\-biff' option, \fIrcvtty\fP will obey the notification
- ! status set by \fIbiff\fP\0(1) instead.
- If the terminal access daemon (TTYD) is available on your system,
- ***************
- *** 327,371 ****
- .Sa
- ! .if '\*(ZS'slocal' \{\
- ! rcvstore (1), mh\-format(5)
- ! .\}
- ! .if '\*(ZS'mmdfII' \{\
- ! rcvstore (1), maildelivery(5), mh\-format(5)
- ! .\}
- ! .Co
- ! None
- ! .if '\*(ZS'slocal' \{\
- ! .Hi
- ! For compatibility with older versions of \fIMH\fR,
- ! if \fIslocal\fR can't find the user's \fI\&.maildelivery\fR file,
- ! it will attempt to execute an old\-style rcvmail hook in the user's $HOME
- ! directory.
- ! In particular,
- ! it will first attempt to execute
- !
- ! .ti +.5i
- ! \&.mh\(rureceive file maildrop directory user
- !
- ! failing that it will attempt to execute
- !
- ! .ti +.5i
- ! $HOME/bin/rcvmail user file sender
- !
- ! before giving up and writing to the user's maildrop.
- !
- ! In addition,
- ! whenever a hook or process is invoked,
- ! file\-descriptor three (3) is set to the message in addition to the standard
- ! input.
- !
- ! @BEGIN: MMDFIMTS
- ! In addition to an exit status of zero,
- ! the \fIMMDF\fR values \fIRP_MOK\fR (32) and \fIRP_OK\fR (9)
- ! mean that the message has been fully delivered.
- ! All other non\-zero exit status,
- ! including abnormal termination,
- ! is interpreted as the \fIMMDF\fR value \fIRP_MECH\fR (200),
- ! which means \*(lquse an alternate route\*(rq
- ! (deliver the message to the maildrop).
- ! @END: MMDFIMTS
- ! .\}
- .Bu
- --- 92,94 ----
- .Sa
- ! rcvstore (1), mh\-format(5), slocal(1)
- .Bu
- ***************
- *** 372,383 ****
- Only two return codes are meaningful, others should be.
- -
- - .if '\*(ZS'mmdfII' \{\
- - Versions of \fIMMDF\fR with the \fImaildelivery\fR mechanism aren't
- - entirely backwards\-compatible with earlier versions.
- - If you have an old\-style hook, the best you can do is to have a one\-line
- - \fI\&.maildelivery\fR file:
- -
- - .ti +.15i
- - default \- pipe A \*(lqbin/rcvmail $(address) $(info) $(sender)\*(rq
- - .\}
- .En
- --- 95,96 ----
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/doc/mhparam.rf Mon Nov 16 14:27:31 1992
- ***************
- *** 0 ****
- --- 1,70 ----
- + .\" @(MHWARNING)
- + .\" @(#)$Id: mhparam.rf,v 1.2 1992/11/16 22:27:09 jromine Exp $
- + .SC MHPARAM 1
- + .NA
- + mhparam \- print MH profile components
- + .SY
- + mhparam
- + \%[components]
- + \%[-all]
- + \%[-component] \%[-nocomponent]
- + \%[\-help]
- + .DE
- + \fIMhparam\fR writes the value of the specified profile component to
- + the standard output separated by newlines. If the profile component
- + is not present, the default value (or nothing if there is no default)
- + is printed.
- +
- + If more than one component is specified in the `components' list, the component value is
- + preceded by the component name. If `\-component' is specified, the
- + component name is displayed even when only one component is specified.
- + If `\-nocomponent' is specified, the component name is not displayed
- + even when more than one component is specified.
- +
- + If `\-all' is specified, all components if the MH profile are
- + displayed and other arguments are ignored.
- +
- + Examples:
- +
- + .nf
- + .ta \w'AliasFile:'u+2n
- + .in +.5i
- + % mhparam path
- + Mail
- +
- + % mhparam mhlproc
- + @(MHETCPATH)/mhl
- +
- + % mhparam \-component path
- + Path: Mail
- +
- + % mhparam AliasFile rmmproc
- + AliasFile: aliases
- + rmmproc: rmmproc
- +
- + % mhparam \-nocomponent AliasFile rmmproc
- + aliases
- + rmmproc
- + .in -.5i
- + .fi
- +
- + \fIMhparam\fR is also useful in back\-quoted operations:
- +
- + .nf
- + .in +.5i
- + % fgrep cornell.edu `mhpath +`/`mhparam aliasfile`
- +
- + .in -.5i
- + .fi
- + .Fi
- + ^$HOME/\&.mh\(ruprofile~^The user profile
- + .Sa
- + mh-profile\|(5)
- + .De
- + `\-nocomponent' if only one component is specified
- + `\-component' if more than one component is specified
- + .Ds
- + `components' defaults to none
- + .Co
- + None
- + .En
- *** ../mh-6.7.2/conf/doc/mhpath.rf Thu Apr 5 16:04:27 1990
- --- conf/doc/mhpath.rf Tue Feb 11 14:40:28 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mhpath.rf,v 1.6 90/04/05 15:08:26 sources Exp $
- .SC MHPATH 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: mhpath.rf,v 1.7 1992/02/11 22:40:23 jromine Exp $
- .SC MHPATH 1
- ***************
- *** 21,22 ****
- --- 21,23 ----
- Because of this:
- + .sp
- 1) the name \*(lqnew\*(rq has been added to \fImhpath\fR's list of
- ***************
- *** 29,30 ****
- --- 30,32 ----
- The \*(lqnew\*(rq message may not be used as part of a message range.
- + .sp
- 2) Within a message list,
- ***************
- *** 35,36 ****
- --- 37,39 ----
- All other message designations must refer to at least one existing message.
- + .sp
- 3) An empty folder is not in itself an error.
- *** ../mh-6.7.2/conf/doc/msgchk.rf Mon Apr 9 20:22:48 1990
- --- conf/doc/msgchk.rf Tue Feb 11 13:18:54 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: msgchk.rf,v 1.6 90/04/09 20:22:46 sources Exp $
- .SC MSGCHK 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: msgchk.rf,v 1.7 1992/02/04 21:41:41 jromine Exp $
- .SC MSGCHK 1
- ***************
- *** 11,12 ****
- --- 11,13 ----
- \%[\-host\ host] \%[\-user\ user]
- + \%[\-apop] \%[\-noapop]
- \%[\-rpop] \%[\-norpop]
- ***************
- *** 46,53 ****
- \fImsgchk\fR will query the POP service host as to the status of mail waiting.
- ! The `\-user\ user' switch may be given to specify the name of the POP
- ! subscriber you wish to check mail for on the POP service host.
- ! The `\-rpop' switch uses the UNIX \fIrPOP\fR
- ! (authentication done via trusted connections).
- ! In contrast, the `\-norpop' switch uses the ARPA \fIPOP\fR
- ! (in which case \fImsgchk\fR will prompt for a password).
- @END: POP
- --- 47,61 ----
- \fImsgchk\fR will query the POP service host as to the status of mail waiting.
- ! If the `\-user\ user' switch is not given,
- ! then the current username is used.
- ! Normally,
- ! \fImsgchk\fR will prompt for a password to use.
- ! However,
- ! if the `\-apop' switch is given,
- ! \fImsgchk\fR will generate authentication credentials to provide
- ! for origin authentication and replay protection,
- ! but which do not involve sending a password in the clear over the network.
- ! Otherwise,
- ! if the `\-rpop' switch is given,
- ! then \fImsgchk\fR will try to use a \*(lqtrusted\*(rq connection
- ! (ala the BSD r-commands).
- @END: POP
- *** ../mh-6.7.2/conf/doc/msh.rf Thu Apr 5 16:04:57 1990
- --- conf/doc/msh.rf Fri Oct 16 14:36:19 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: msh.rf,v 1.8 90/04/05 15:13:40 sources Exp $
- .SC MSH 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: msh.rf,v 1.9 1992/10/16 21:36:14 jromine Exp $
- .SC MSH 1
- ***************
- *** 65,66 ****
- --- 65,70 ----
- .br
- + @BEGIN: MIME
- + mhn
- + .br
- + @END: MIME
- msgchk
- *** ../mh-6.7.2/conf/doc/packf.rf Thu Apr 5 16:04:58 1990
- --- conf/doc/packf.rf Tue May 12 15:25:08 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: packf.rf,v 1.5 90/04/05 15:13:54 sources Exp $
- .SC PACKF 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: packf.rf,v 1.8 1992/05/12 22:24:59 jromine Exp $
- .SC PACKF 1
- ***************
- *** 4,6 ****
- .NA
- ! packf \- compress a folder into a single file
- .SY
- --- 4,6 ----
- .NA
- ! packf \- compress an MH folder into a single file
- .SY
- ***************
- *** 31,32 ****
- --- 31,33 ----
- ^$HOME/\&.mh\(ruprofile~^The user profile
- + ^\&.msgbox\&.map~^A binary index of the file
- .Pr
- ***************
- *** 48,49 ****
- --- 49,57 ----
- The first message packed will become the current message.
- + .Bu
- + \fIPackf\fP doesn't handle the old UUCP-style \*(lqmbox\*(rq format
- + (used by \fISendMail\fP).
- + To pack messages into this format,
- + use the script \fI@(MHETCPATH)/packmbox\fP.
- + Note that \fIpackmbox\fP does not take the `\-file' option of \fIpackf\fP,
- + and instead writes its output on \fIstdout\fP.
- .En
- *** ../mh-6.7.2/conf/doc/pick.rf Tue Dec 18 14:57:43 1990
- --- conf/doc/pick.rf Mon Oct 26 16:03:59 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: pick.rf,v 1.6 90/12/18 14:57:30 mh Exp $
- .SC PICK 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: pick.rf,v 1.9 1992/10/27 00:03:47 jromine Exp $
- .SC PICK 1
- ***************
- *** 27,28 ****
- --- 27,34 ----
- \%[\-\|\-component\ pattern]
- + \%[\-cc\ pattern]
- + \%[\-date\ pattern]
- + \%[\-from\ pattern]
- + \%[\-search\ pattern]
- + \%[\-subject\ pattern]
- + \%[\-to\ pattern]
- \%[\-after\ date] \%[\-before\ date] \%[\-datefield\ field]
- ***************
- *** 137,139 ****
- --- 143,153 ----
- .ti +.5i
- + .ie t \{\
- pick\0\-after\0yesterday\0\-and\0\-lbrace\0\-from\0freida\0\-or\0\-from\0fear\0\-rbrace
- + .\}
- + .el \{\
- + pick\0\-after\0yesterday\0\-and
- + .br
- + .ti +1i
- + \-lbrace\0\-from\0freida\0\-or\0\-from\0fear\0\-rbrace
- + .\}
-
- ***************
- *** 148,149 ****
- --- 162,167 ----
-
- + If no search criteria are given, all the messages
- + specified on the command
- + line are selected (this defaults to \*(lqall\*(rq).
- +
- Once the search has been performed,
- ***************
- *** 244,245 ****
- --- 262,267 ----
- they aren't any more.
- + .Hh
- + Use \*(lqpick sequence \-list\*(rq
- + to enumerate the messages in a sequence (such as for use
- + by a shell script).
- .Bu
- ***************
- *** 259,261 ****
-
- ! and \fIpick\fR fails (e.g., no messages are from \*(lqjones\*(rq),
- then the shell will still run the outer command (e.g., \*(lqscan\*(rq).
- --- 281,284 ----
-
- ! and \fIpick\fR selects no messages
- ! (e.g., no messages are from \*(lqjones\*(rq),
- then the shell will still run the outer command (e.g., \*(lqscan\*(rq).
- ***************
- *** 273,274 ****
- --- 296,300 ----
- This lets the outer command fail gracefully as well.
- + .sp
- + The pattern syntax \*(lq[l-r]\*(rq is not supported; each letter
- + to be matched must be included within the square brackets.
- .En
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/doc/popauth.rf Thu Feb 6 14:46:26 1992
- ***************
- *** 0 ****
- --- 1,41 ----
- + .\" @(MHWARNING)
- + .\" @(#)$Id: popauth.rf,v 1.1 1992/02/06 22:46:24 jromine Exp $
- + .SC POPAUTH 8
- + .NA
- + popauth - manipulate POP authorization DB
- + .SY
- + popauth
- + \%[\-init] \%[\-list] \%[\-user\ name]
- + \%[\-help]
- + .DE
- + The \fIpopauth\fR program allows a POP-subscriber to change the secret
- + value used to generate their authentication credentials.
- + In addition,
- + the super\-user or master POP user may use this program to either
- + initialize the database or to print public information from it.
- + \fIpopauth\fR is useful only when the APOP configuration option is defined.
- + (This configuration option defines the name of the POP authorization DB.)
- +
- + Under normal usage,
- + \fIpopauth\fR prompts for a new secret,
- + just like the \fIpasswd\fR program.
- + It then updates the POP authorization DB accordingly.
- +
- + With the `\-init' switch,
- + the super-user or master POP user can create a new (or zero the existing)
- + POP authorization DB.
- +
- + With the `\-list' switch,
- + the super-user or master POP user can print out public information
- + about the named subscriber (or all subscribers).
- + .Fi
- + ^/etc/pop.auth.*~^POP authorization DB
- + .Pr
- + None
- + .Sa
- + popd(8)
- + .De
- + None
- + .Co
- + None
- + .En
- *** ../mh-6.7.2/conf/doc/popd.rf Mon Apr 9 20:22:50 1990
- --- conf/doc/popd.rf Tue Feb 4 13:13:28 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: popd.rf,v 1.8 90/04/09 20:22:49 sources Exp $
- .SC POPD 8
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: popd.rf,v 1.9 1992/02/04 21:13:28 jromine Exp $
- .SC POPD 8
- ***************
- *** 10,12 ****
- .DE
- ! The \fIpopd\fR server implements the Post Office protocol,
- as described in RFC1081 and RFC1082.
- --- 10,12 ----
- .DE
- ! The \fIpopd\fR server implements the Post Office Protocol (version 3),
- as described in RFC1081 and RFC1082.
- ***************
- *** 16,17 ****
- --- 16,27 ----
- The `\-p' option overrides the default TCP port.
- + .PP
- + If the POP2 configuration option is defined,
- + then the server also implements version 2 of the protocol.
- + .PP
- + If the APOP configuration option is defined,
- + then the server supports a non-standard mechanism for identity-establishment
- + in which authentication credentials are used to provide for origin
- + authentication and reply protection,
- + but which do not involve sending a password in the clear over the network.
- + See \fIpopauth\fR(8) for more details.
- .Fi
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/doc/popi.rf Thu Feb 6 14:46:25 1992
- ***************
- *** 0 ****
- --- 1,124 ----
- + .\" @(MHWARNING)
- + .\" @(#)$Id: popi.rf,v 1.1 1992/02/06 22:46:24 jromine Exp $
- + .SC POPI 1
- + .NA
- + popi \- POP initiator
- + .SY
- + popi
- + \%[+folder]
- + \%[\-host\ host] \%[\-user\ user]
- + \%[\-apop] \%[\-noapop]
- + \%[\-rpop] \%[\-norpop]
- + @BEGIN: BPOP
- + \%[\-auto] \%[\-noauto]
- + \%[\-mshproc\ program]
- + @END: BPOP
- + \%[\-form\ formatfile]
- + \%[\-format\ string]
- + \%[\-width\ columns]
- + \%[\-help]
- + .DE
- + \fIpopi\fR is an interactive program that implements the client side
- + of the Post Office Protocol (version 3).
- +
- + When invoked,
- + \fIpopi\fR establishes a POP connection,
- + and enters a command loop.
- + The user may type most of the normal POP commands,
- + with a couple of additions:
- + The commands that \fIpop\fR currently supports are:
- + .sp 1
- + .in +.5i
- + dele msg
- + .br
- + last
- + .br
- + list [msg]
- + .br
- + noop
- + .br
- + quit
- + .br
- + retr msg
- + .br
- + rset
- + .br
- + scan
- + .br
- + stat
- + .br
- + top
- + @BEGIN: BPOP
- + .br
- + msh
- + @END: BPOP
- + .in -.5i
- + .sp
- + The \fIretr\fR command retrieves a message into the folder specified
- + on the command line.
- + The \fIscan\fR command downloads an MH format-string to the server
- + (as determined from the `\-form\ formatfile' and `\-format switches),
- + so that future invocations of the \fIlist\fR command will include a
- + scan listing.
- + The \fIquit\fR command terminates \fIpopi\fR,
- + as does typing CTRL\-D.
- +
- + @BEGIN: BPOP
- + The \fImsh\fR command invokes the \fImshproc\fR.
- + To override the default \fImshproc\fR and the profile entry,
- + use the `\-mshproc\ program' switch.
- + The `\-auto' switch causes \fIpopi\fR to invoke the \fImshproc\fR directly,
- + and thence terminate when the \fImshproc\fR terminates.
- + @END: BPOP
- +
- + The `\-host\ host' switch specifies the POP server to use.
- + If the `\-user\ user' switch is not given,
- + then the current username is used.
- + Normally,
- + \fIpopi\fR will prompt for a password to use.
- + However,
- + if the `\-apop' switch is given,
- + \fIpopi\fR will generate authentication credentials to provide
- + for origin authentication and replay protection,
- + but which do not involve sending a password in the clear over the network.
- + Otherwise,
- + if the `\-rpop' switch is given,
- + then \fIpopi\fR will try to use a \*(lqtrusted\*(rq connection
- + (ala the BSD r-commands).
- + .Fi
- + ^$HOME/\&.mh\(ruprofile~^The user profile
- + ^@(MHETCPATH)/mtstailor~^tailor file
- + .Pr
- + ^Path:~^To determine the user's MH directory
- + .Ps
- + ^Msg\-Protect:~^To set mode when creating a new `file'
- + @BEGIN: BPOP
- + .Ps
- + ^mshproc:~^Program to read a given BBoard
- + @END: BPOP
- + .Sa
- + msh(1)
- + .De
- + `+folder' defaults to \*(lqinbox\*(rq
- + .Ds
- + `\-noapop'
- + .Ds
- + `\-norpop'
- + @BEGIN: BPOP
- + .Ds
- + `\-auto'
- + @END: BPOP
- + .Ds
- + `\-format' defaulted as described above
- + .Ds
- + `\-width' defaulted to the width of the terminal
- + .Co
- + The folder into which messages are being incorporated will become the
- + current folder.
- + The current message is unchanged.
- + .Bu
- + The argument to the `\-format' switch must be interpreted as a single token
- + by the shell that invokes \fIinc\fR.
- + Therefore,
- + one must usually place the argument to this switch inside double\-quotes.
- + .En
- *** ../mh-6.7.2/conf/doc/post.rf Thu Apr 5 16:05:02 1990
- --- conf/doc/post.rf Thu Oct 29 14:24:52 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: post.rf,v 1.5 90/04/05 15:14:35 sources Exp $
- .SC POST 8
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: post.rf,v 1.7 1992/10/29 22:24:50 jromine Exp $
- .SC POST 8
- ***************
- *** 13,14 ****
- --- 13,17 ----
- \%[\-format] \%[\-noformat]
- + @BEGIN: MIME
- + \%[\-mime] \%[\-nomime]
- + @END: MIME
- \%[\-msgid] \%[\-nomsgid]
- ***************
- *** 62,63 ****
- --- 65,71 ----
- prior to being sent to the blind recipients.
- + @BEGIN: MIME
- + Otherwise,
- + to use the MIME rules for encapsulation,
- + specify the `\-mime' switch.
- + @END: MIME
-
- ***************
- *** 100,102 ****
- --- 108,114 ----
- `\-format'
- + @BEGIN: MIME
- .Ds
- + `\-nomime'
- + @END: MIME
- + .Ds
- `\-nomsgid'
- ***************
- *** 105,107 ****
- .Ds
- ! '\-nowatch'
- .Ds
- --- 117,119 ----
- .Ds
- ! `\-nowatch'
- .Ds
- *** ../mh-6.7.2/conf/doc/prompter.rf Tue Dec 18 15:12:08 1990
- --- conf/doc/prompter.rf Tue May 12 15:23:56 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: prompter.rf,v 1.7 90/12/18 15:12:01 mh Exp $
- .SC PROMPTER 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: prompter.rf,v 1.8 1992/05/12 22:23:34 jromine Exp $
- .SC PROMPTER 1
- ***************
- *** 4,6 ****
- .NA
- ! prompter \- prompting editor front\-end
- .SY
- --- 4,6 ----
- .NA
- ! prompter \- prompting editor front-end for MH
- .SY
- *** ../mh-6.7.2/conf/doc/rcvstore.rf Thu Apr 5 16:05:04 1990
- --- conf/doc/rcvstore.rf Thu Nov 19 16:40:45 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: rcvstore.rf,v 1.5 90/04/05 15:14:48 sources Exp $
- .SC RCVSTORE 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: rcvstore.rf,v 1.7 1992/11/20 00:40:37 jromine Exp $
- .SC RCVSTORE 1
- ***************
- *** 17,20 ****
- If `+folder' isn't specified,
- ! the folder named \*(lqinbox\*(rq in the user's \fIMH\fR directory will be used
- ! instead.
- The new message being incorporated is assigned the next highest
- --- 17,21 ----
- If `+folder' isn't specified,
- ! a folder in the user's \fIMH\fR directory will be used, either that
- ! specified by the \*(lqInbox:\*(rq entry in the user's profile, or
- ! the folder named \*(lqinbox\*(rq.
- The new message being incorporated is assigned the next highest
- ***************
- *** 60,61 ****
- --- 61,64 ----
- .Ps
- + ^Inbox:~^To find the default inbox
- + .Ps
- ^Msg\-Protect:~^To set mode when creating a new message
- ***************
- *** 76,77 ****
- --- 79,87 ----
- with the exception of sequence manipulation.
- + .Bu
- + If you use the \*(lqUnseen\-Sequence\*(rq profile entry,
- + \fIrcvstore\fP could try to update the context while another
- + \fIMH\fP process is also trying to do so.
- + This can cause the context to become corrupted.
- + To avoid this, do not use \fIrcvstore\fP
- + if you use the \*(lqUnseen\-Sequence\*(rq profile entry.
- .En
- *** ../mh-6.7.2/conf/doc/refile.rf Wed Jan 29 15:51:18 1992
- --- conf/doc/refile.rf Mon Feb 10 12:27:40 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: refile.rf,v 1.8 1991/01/14 16:43:06 mh Exp $
- .SC REFILE 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: refile.rf,v 1.11 1992/02/10 20:27:30 jromine Exp $
- .SC REFILE 1
- ***************
- *** 50,51 ****
- --- 50,54 ----
- A negative response will abort the file operation.
- + If the standard input for \fIrefile\fR is \fInot\fR a tty,
- + then \fIrefile\fR will not ask any questions and will proceed as if
- + the user's answer was \*(lqyes\*(rq for all questions.
-
- ***************
- *** 111,113 ****
- \fIrefile\fR will also define those sequences for the destination folders.
- ! See \fImh\-profile\fR\0(1) for information concerning the previous sequence.
- .Bu
- --- 114,116 ----
- \fIrefile\fR will also define those sequences for the destination folders.
- ! See \fImh\-sequence\fR\0(5) for information concerning the previous sequence.
- .Bu
- *** ../mh-6.7.2/conf/doc/repl.rf Mon Dec 17 16:00:43 1990
- --- conf/doc/repl.rf Tue Nov 17 17:19:08 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: repl.rf,v 1.10 90/12/17 16:00:35 mh Exp $
- .SC REPL 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: repl.rf,v 1.11 1992/11/18 01:18:54 jromine Exp $
- .SC REPL 1
- ***************
- *** 120,124 ****
- .in +.5i
- ! message-id:nocomponent,formatfield=\\
- ! "In message %{text}you write:"
- ! body:component=">",overflowtext=">",overflowoffset=0
- .in -.5i
- --- 120,127 ----
- .in +.5i
- ! .ie n \{
- ! message-id:nocomponent,\|nonewline,\\
- ! formatfield=\*(lqIn message %{text},\ \*(rq \}
- ! .el message-id:nocomponent,\|nonewline,\|formatfield=\*(lqIn message %{text},\ \*(rq
- ! from:nocomponent,\|formatfield=\*(lq%(friendly{text}) writes:\*(rq
- ! body:component=\*(lq>\*(rq,\|overflowtext=\*(lq>\*(rq,\|overflowoffset=0
- .in -.5i
- ***************
- *** 126,128 ****
-
- ! Which cites the Message-ID of the message being replied\-to,
- and then outputs each line of the body prefaced
- --- 129,132 ----
-
- ! Which cites the Message-ID and author
- ! of the message being replied\-to,
- and then outputs each line of the body prefaced
- *** ../mh-6.7.2/conf/doc/rmf.rf Thu Apr 5 16:05:06 1990
- --- conf/doc/rmf.rf Tue May 12 15:25:07 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: rmf.rf,v 1.5 90/04/05 15:15:06 sources Exp $
- .SC RMF 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: rmf.rf,v 1.7 1992/05/12 22:24:59 jromine Exp $
- .SC RMF 1
- ***************
- *** 4,6 ****
- .NA
- ! rmf \- remove folder
- .SY
- --- 4,6 ----
- .NA
- ! rmf \- remove an MH folder
- .SY
- ***************
- *** 20,22 ****
- If \fIrmf\fR can't find the current folder, for some reason,
- ! the folder to be removed defaults to `+inbox' with confirmation.
-
- --- 20,23 ----
- If \fIrmf\fR can't find the current folder, for some reason,
- ! the folder to be removed defaults to `+inbox' (unless overridden by
- ! user's profile entry \*(lqInbox\*(rq) with confirmation.
-
- ***************
- *** 42,43 ****
- --- 43,46 ----
- ^Current\-Folder:~^To find the default current folder
- + .Ps
- + ^Inbox:~^To find the default inbox
- .Sa
- *** ../mh-6.7.2/conf/doc/scan.rf Wed Jan 29 14:56:25 1992
- --- conf/doc/scan.rf Thu Oct 29 14:02:01 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: scan.rf,v 1.10 1992/01/29 22:56:18 jromine Exp $
- .SC SCAN 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: scan.rf,v 1.11 1992/10/29 22:01:56 jromine Exp $
- .SC SCAN 1
- ***************
- *** 90,92 ****
- .nf
- ! .ta \w'Escape 'u +\w'Returns 'u
- \fIEscape\fR \fIReturns\fR \fIDescription\fR
- --- 90,92 ----
- .nf
- ! .ta \w'Dtimenow 'u +\w'Returns 'u
- \fIEscape\fR \fIReturns\fR \fIDescription\fR
- ***************
- *** 93,94 ****
- --- 93,95 ----
- body string the (compressed) first part of the body
- + dtimenow date the current date
- folder string the name of the current folder
- ***************
- *** 100,102 ****
- date of last modification of the message file itself.
- -
-
- --- 101,102 ----
- *** ../mh-6.7.2/conf/doc/send.rf Thu Apr 5 16:04:35 1990
- --- conf/doc/send.rf Fri Dec 4 09:30:28 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: send.rf,v 1.6 90/04/05 15:09:54 sources Exp $
- .SC SEND 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: send.rf,v 1.12 1992/12/04 17:30:23 jromine Exp $
- .SC SEND 1
- ***************
- *** 16,17 ****
- --- 16,20 ----
- \%[\-forward] \%[\-noforward]
- + @BEGIN: MIME
- + \%[\-mime] \%[\-nomime]
- + @END: MIME
- \%[\-msgid] \%[\-nomsgid]
- ***************
- *** 18,19 ****
- --- 21,25 ----
- \%[\-push] \%[\-nopush]
- + @BEGIN: MIME
- + \%[\-split\ seconds]
- + @END: MIME
- \%[\-verbose] \%[\-noverbose]
- ***************
- *** 53,55 ****
- --- 59,75 ----
- information.
- + @BEGIN: MIME
-
- + If `\-split' is specified,
- + \fIsend\fR will split the draft into one or more partial messages
- + prior to sending.
- + This makes use of the multi-media content feature in MH.
- + Note however that if \fIsend\fR is invoked under \fIdist\fR\0(1),
- + then this switch is ignored\0--\0it makes no sense to redistribute a
- + message in this fashion.
- + Sometimes you want \fIsend\fR to pause after posting a partial message.
- + This is usually the case when you are running \fIsendmail\fR and
- + expect to generate a lot of partial messages.
- + The argument to `\-split' tells it how long to pause between postings.
- + @END: MIME
- +
- \fISend\fR with no \fIfile\fR
- ***************
- *** 76,77 ****
- --- 96,102 ----
- prior to being sent to the blind recipients.
- + @BEGIN: MIME
- + Otherwise,
- + to use the MIME rules for encapsulation,
- + specify the `-mime' switch.
- + @END: MIME
-
- ***************
- *** 123,125 ****
-
- ! The file specified by the profile entry \*(lqAliasfile:\*(rq and any
- additional alias files given by the `\-alias aliasfile' switch will be read
- --- 148,150 ----
-
- ! The files specified by the profile entry \*(lqAliasfile:\*(rq and any
- additional alias files given by the `\-alias aliasfile' switch will be read
- ***************
- *** 158,160 ****
- --- 183,189 ----
- `\-forward'
- + @BEGIN: MIME
- .Ds
- + `\-nomime'
- + @END: MIME
- + .Ds
- `\-nomsgid'
- ***************
- *** 170,171 ****
- --- 199,207 ----
- None
- + .Bu
- + Under some configurations, it is not possible to mointor the
- + mail delivery transaction; `\-watch' is a no-op on those systems.
- + .sp
- + @BEGIN: MIME
- + Using `\-split\00' doesn't work correctly.
- + @END: MIME
- .En
- *** ../mh-6.7.2/conf/doc/show.rf Mon Dec 17 16:03:28 1990
- --- conf/doc/show.rf Tue May 19 14:57:41 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: show.rf,v 1.5 90/04/05 15:15:20 sources Exp $
- .SC SHOW 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: show.rf,v 1.7 1992/05/19 21:57:39 jromine Exp $
- .SC SHOW 1
- ***************
- *** 33,35 ****
- --- 33,49 ----
- `/bin/cat' is used instead of \fIshowproc\fR.
- + @BEGIN: MIME
-
- + If you have messages with multi-media content,
- + you should define the profile entry \fImhnproc\fR,
- + which is the name of a program to manipulate multi-media messages.
- + The \fImhn\fR\0(1) program is suitable for this purpose.
- + Note that if the \fImhnproc\fR profile entry is defined,
- + the `\-noshowproc' option is NOT specified,
- + and if one or more named messages has a multi-media content,
- + then the program indicated by \fImhnproc\fR will be run instead of
- + \fIshowproc\fR.
- + The use of the \fImhnproc\fR can also be disabled if the
- + environment variable \fB$NOMHNPROC\fR is set.
- + @END: MIME
- +
- The `\-header' switch tells \fIshow\fR to display a one\-line
- ***************
- *** 71,72 ****
- --- 85,90 ----
- ^showproc:~^Program to show messages
- + @BEGIN: MIME
- + .Ps
- + ^mhnproc:~^Program to show messages with multi-media content
- + @END: MIME
- .Sa
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/doc/slocal.rf Wed Oct 28 08:53:07 1992
- ***************
- *** 0 ****
- --- 1,377 ----
- + .\" @(MHWARNING)
- + .\" @(#)$Id: slocal.rf,v 1.15 1992/10/28 16:53:03 jromine Exp $
- + .SC SLOCAL 1
- + .NA
- + slocal \- special local mail delivery
- + .SY
- + @(MHETCPATH)/slocal \%[address\ info\ sender]
- + .na
- + .br
- + \%[\-addr\ address]
- + \%[\-info\ data]
- + \%[\-sender\ sender]
- + .br
- + \%[\-user\ username]
- + \%[\-mailbox\ mbox]
- + \%[\-file\ file]
- + .\" \%[\-home\ homedir]
- + .br
- + \%[\-maildelivery\ deliveryfile]
- + \%[\-verbose] \%[\-noverbose]
- + \%[\-debug]
- + \%[\-help]
- + .ad
- + .DE
- + \fISlocal\fP is a program designed to allow you to have
- + your inbound mail processed according to a complex
- + set of selection criteria.
- + You do not normally invoke \fIslocal\fP yourself,
- + rather \fIslocal\fP is invoked on your behalf by your system's
- + Message Transfer Agent.
- +
- + The message selection
- + criteria used by \fIslocal\fP
- + is specified in the file \fI\&.maildelivery\fP
- + in the user's home directory. The format of this file
- + is given below.
- +
- + The message delivery address and message sender are
- + determined from the Message Transfer Agent
- + envelope information, if possible. Under \fISendMail\fP,
- + the sender will obtained from the UUCP \*(lqFrom\ \*(rq
- + line, if present. The user may override these values
- + with command line arguments, or arguments to
- + the `\-addr' and `\-sender' switches.
- +
- + The message is normally read from the standard input.
- + The `\-file' switch sets the name of the file from which
- + the message should be read, instead of reading stdin.
- + The `\-user' switch tells \fIslocal\fP
- + the name of the user for whom it is delivering mail.
- + The `\-mailbox' switch tells \fIslocal\fP the name
- + of the user's maildrop file.
- +
- + The `\-info' switch may be used to pass an arbitrary
- + argument to sub-processes which \fIslocal\fP may
- + invoke on your behalf.
- + The `\-verbose' switch causes \fIslocal\fP
- + to give information on stdout about its progress.
- + The `\-debug' switch produces more verbose debugging output on stderr.
- +
- + .Uh "Message Transfer Agents"
- + If your MTA is \fISendMail\fP,
- + you should include the line
- + .sp
- + .nf
- + .in +.5i
- + \*(lq|\ @(MHETCPATH)/slocal\ \-user\ username\*(rq
- + .in -.5i
- + .fi
- + .sp
- + in your \&.forward file in your home directory.
- + This will cause \fISendMail\fP to invoke \fIslocal\fP on your behalf.
- +
- + If your MTA is \fIMMDF-I\fP,
- + you should (symbolically) link @(MHETCPATH)/slocal to the file
- + bin/rcvmail in your home directory.
- + This will cause \fIMMDF-I\fP to invoke \fIslocal\fP on your behalf
- + with the correct \*(lq\fIaddress\ info\ sender\fP\*(rq arguments.
- +
- + If your MTA is \fIMMDF-II\fP,
- + then you should not use \fIslocal\fP.
- + An equivalent functionality is already provided by \fIMMDF-II\fP;
- + see maildelivery(5) for details.
- +
- + .Uh "The Maildelivery File"
- +
- + The \fI\&.maildelivery\fR file
- + controls how local delivery is performed.
- + Each line of this file
- + consists of five fields, separated by white-space or comma.
- + Since double-quotes are honored,
- + these characters may be included in a single argument by enclosing the
- + entire argument in double-quotes.
- + A double-quote can be included by preceding it with a backslash.
- + Lines beginning with `#' are ignored.
- + The format of each line in the \fI\&.maildelivery\fR file is:
- +
- +
- + \fBheader pattern action result string\fR
- + .sp
- + .in +.5i
- + .ti -.5i
- + \fBheader\fP:
- + .br
- + The name of a header field that is to be searched for a pattern.
- + This is any field in the headers of the message that might be present.
- + The following special fields are also defined:
- + .sp
- + .in +1i
- + .ta +1i
- + .ti -1i
- + \fIsource\fR the out-of-band sender information
- + .ti -1i
- + \fIaddr\fR the address that was used to cause delivery to the recipient
- + .ti -1i
- + \fIdefault\fR this matches \fIonly\fR if the message hasn't been delivered yet
- + .ti -1i
- + \fI*\fR this always matches
- + .in -1i
- +
- + .ti -.5i
- + \fBpattern\fR:
- + .br
- + The sequence
- + of characters to match in the specified header field.
- + Matching is case-insensitive, but does not use regular expressions.
- +
- + .ti -.5i
- + \fBaction\fR:
- + .br
- + The action to take to deliver the message:
- + .sp
- + .in +1i
- + .ta +1i
- + .ti -1i
- + \fIdestroy\fR This action always succeeds.
- +
- + .ti -1i
- + \fIfile\fR or > Append
- + the message to the file named by \fBstring\fR.
- + The message is appended to the file in the maildrop
- + format which is used by your message transport system.
- + If the message can be appended to the file,
- + then this action succeeds.
- + When writing to the file,
- + a \*(lqDelivery\-Date:\ date\*(rq header is added
- + which indicates the date and time that message was appended to the file.
- +
- + .ti -1i
- + \fImbox\fR Identical
- + to \fIfile\fR,
- + but always appends the message using the format used by \fIpackf\fR
- + (the MMDF mailbox format).
- +
- + .ti -1i
- + \fIpipe\fR or | Pipe
- + the message as the standard input to the command named by \fBstring\fR,
- + using the Bourne shell \fIsh\fR(1) to interpret the string.
- + Prior to giving the string to the shell,
- + it is expanded with the following built-in variables:
- + .sp
- + .in +1i
- + .ta +1i
- + .ti -1i
- + $(sender) the out-of-band sender information
- + .ti -1i
- + $(address) the address that was used to cause delivery to the recipient
- + .ti -1i
- + $(size) the size of the message in bytes
- + .ti -1i
- + $(reply\-to) either the \*(lqReply\-To:\*(rq or \*(lqFrom:\*(rq field
- + of the message
- + .ti -1i
- + $(info) the out-of-band information specified
- + .in -1i
- + .ti -1i
- + \fIqpipe\fR or
- + .ti -1i
- + \fI<caret>\fR Similar to \fIpipe\fR,
- + but executes the command directly,
- + after built-in variable expansion,
- + without assistance from the shell.
- + This action can be used to avoid quoting special characters
- + which your shell might interpret.
- + .in -1i
- +
- + .ti -.5i
- + \fBresult\fR:
- + .br
- + Indicates how the action should be performed:
- +
- + .in +1i
- + .ta +1i
- + .ti -1i
- + \fIA\fR Perform the action.
- + If the action succeeds, then the message is considered delivered.
- +
- + .ti -1i
- + \fIR\fR Perform the action.
- + Regardless of the outcome of the action,
- + the message is not considered delivered.
- +
- + .ti -1i
- + \fI?\fR Perform
- + the action only if the message has not been delivered.
- + If the action succeeds, then the message is considered delivered.
- +
- + .ti -1i
- + \fIN\fR Perform
- + the action only if the message has not been delivered
- + and the previous action succeeded.
- + If this action succeeds, then the message is considered delivered.
- + .sp
- + .in -1i
- + .in -.5i
- + To summarize, here's an example:
- + .sp
- + .if t .in +.5i
- + .nf
- + .ta \w'default 'u +\w'mh-workersxx 'uC +\w'destroy 'uC +\w'result 'u
- + #\fIfield\fR \fIpattern\fR \fIaction\fR \fIresult\fR \fIstring\fR
- + # lines starting with a '#' are ignored, as are blank lines
- + #
- + # file mail with mmdf2 in the \*(lqTo:\*(rq line into file mmdf2.log
- + \fITo mmdf2 file A mmdf2.log\fP
- + # Messages from mmdf pipe to the program err-message-archive
- + \fIFrom mmdf pipe A /bin/err-message-archive\fP
- + # Anything with the \*(lqSender:\*(rq address \*(lqmh-workers\*(rq
- + # file in mh.log if not filed already
- + \fISender mh-workers file ? mh.log\fP
- + # \*(lqTo:\*(rq unix \- put in file unix-news
- + \fITo Unix > A unix-news\fP
- + .\" # if the address is jpo=mmdf \- pipe into mmdf-redist
- + .\" \fIaddr jpo=mmdf | A mmdf-redist\fP
- + # if the address is jpo=ack \- send an acknowledgement copy back
- + \fIaddr jpo=ack \fP|\fI R \*(lq/bin/resend\0\-r\0$(reply-to)\*(rq\fP
- + # anything from steve \- destroy!
- + \fIFrom steve destroy A \-\fP
- + # anything not matched yet \- put into mailbox
- + \fIdefault \- > ? mailbox\fP
- + # always run rcvtty
- + \fI* \- \fP|\fI R /mh/lib/rcvtty\fP
- + .re
- + .fi
- + .if t .in -.5i
- +
- + The file is always read completely,
- + so that several matches can be made and several actions can be taken.
- + The \fI\&.maildelivery\fR file must be owned either by the user or by root,
- + and must be writable only by the owner.
- + If the \fI\&.maildelivery\fR file cannot be found,
- + or does not perform an action which delivers the message,
- + then the file @(MHETCPATH)/maildelivery is read according to the same rules.
- + This file must be owned by the root and must be writable only by the root.
- + If this file cannot be found
- + or does not perform an action which delivers the message,
- + then standard delivery to the user's maildrop is performed.
- +
- + .Uh "Sub-process environment"
- + When a process is invoked, its environment is:
- + the user/group-ids are set to recipient's ids;
- + the working directory is the recipient's home directory;
- + the umask is 0077;
- + the process has no /dev/tty;
- + the standard input is set to the message;
- + the standard output and diagnostic output are set to /dev/null;
- + all other file-descriptors are closed;
- + the envariables \fB$USER\fR, \fB$HOME\fR, \fB$SHELL\fR are set
- + appropriately,
- + and no other envariables exist.
- +
- + The process is given a certain amount of time to execute.
- + If the process does not exit within this limit,
- + the process will be terminated with extreme prejudice.
- + The amount of time is calculated as ((size x 60) + 300) seconds,
- + where size is the number of bytes in the message.
- +
- + The exit status of the process is consulted in determining the success of the
- + action.
- + An exit status of zero means that the action succeeded.
- + Any other exit status (or abnormal termination) means that the action failed.
- +
- + In order to avoid any time limitations,
- + you might implement a process that began by \fIforking\fR.
- + The parent would return the appropriate value immediately,
- + and the child could continue on,
- + doing whatever it wanted for as long as it wanted.
- + This approach is somewhat risky if the parent is going to return an
- + exit status of zero.
- + If the parent is going to return a non-zero exit status,
- + then this approach can lead to quicker delivery into your maildrop.
- + @BEGIN: MSGID
- +
- + .Uh "Duplicate Message Suppression"
- + \fIslocal\fR is able to detect and supress duplicate messages.
- + To enable this,
- + create two empty files in your $HOME directory:
- + \&.maildelivery.pag and \&.maildelivery.dir.
- + These are ndbm files which are used to store the Message-IDs of
- + incoming messages.
- + @END: MSGID
- + .Fi
- + ^@(MHETCPATH)/mtstailor~^MH tailor file
- + ^$HOME/\&.maildelivery~^The file controlling local delivery
- + ^@(MHETCPATH)/maildelivery~^Rather than the standard file
- + ^@(MHDROPLOC)~^The default maildrop
- + .Sa
- + rcvstore(1), mhook(1), mh\-format(5)
- + @BEGIN: MMDFIIMTS
- + , maildelivery(5)
- + @END: MMDFIIMTS
- + .De
- + `\-noverbose'
- + .Ds
- + `\-maildelivery \&.maildelivery'
- + .Ds
- + `\-mailbox @(MHDROPLOC)'
- + .Ds
- + `\-file' defaults to stdin
- + .Ds
- + `\-user' defaults to the current user
- + .Co
- + None
- + .Hi
- + @BEGIN: MHMTS
- + For compatibility with older versions of \fIMH\fR,
- + if \fIslocal\fR can't find the user's \fI\&.maildelivery\fR file,
- + it will attempt to execute an old-style rcvmail hook in the user's $HOME
- + directory.
- + In particular,
- + it will first attempt to execute
- +
- + .ti +.5i
- + \&.mh\(rureceive file maildrop directory user
- +
- + failing that it will attempt to execute
- +
- + .ti +.5i
- + $HOME/bin/rcvmail user file sender
- +
- + before giving up and writing to the user's maildrop.
- +
- + In addition,
- + whenever a hook or process is invoked,
- + file-descriptor three (3) is set to the message in addition to the standard
- + input.
- +
- + @END: MHMTS
- + \fISlocal\fP is designed to be backward-compatible with the
- + \fImaildelivery\fP facility provided by \fIMMDF-II\fP.
- + Thus, the \fI\&.maildelivery\fP file syntax is limited,
- + as is the functionality of \fIslocal\fP.
- +
- + In addition to an exit status of zero,
- + the \fIMMDF\fR values \fIRP_MOK\fR (32) and \fIRP_OK\fR (9)
- + mean that the message has been fully delivered.
- + Any other non-zero exit status,
- + including abnormal termination,
- + is interpreted as the \fIMMDF\fR value \fIRP_MECH\fR (200),
- + which means \*(lquse an alternate route\*(rq
- + (deliver the message to the maildrop).
- + .Bu
- + Only two return codes are meaningful, others should be.
- +
- + \fISlocal\fP is designed to be
- + backwards-compatible with the \fImaildelivery\fP functionality provided
- + by \fBMMDF-II\fP.
- +
- + Versions of \fIMMDF\fR with the \fImaildelivery\fR mechanism aren't
- + entirely backwards-compatible with earlier versions of \fIMMDF\fP.
- + If you have an \fIMMDF-I\fP old-style hook,
- + the best you can do is to have a one-line
- + \fI\&.maildelivery\fR file:
- +
- + .ti +.5i
- + default \- pipe A \*(lqbin/rcvmail $(address) $(info) $(sender)\*(rq
- + .En
- *** ../mh-6.7.2/conf/doc/tmac.h Mon Jan 7 16:12:51 1991
- --- conf/doc/tmac.h Fri Oct 30 11:45:38 1992
- ***************
- *** 1,5 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: tmac.h,v 1.6 91/01/07 16:12:37 mh Exp $
- .\" Try to keep only one copy of the documentation around
- .\" by re-defining macros and so forth.
- .\"
- --- 1,5 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: tmac.h,v 1.7 1992/10/30 19:45:32 jromine Exp $
- .\" Try to keep only one copy of the documentation around
- .\" by re-defining macros and so forth.
- .\"
- ***************
- *** 70,73 ****
- --- 70,77 ----
- .de Uh
- .ne 4
- .SS "\\$1"
- + ..
- + .\" a useful -me macro
- + .de re
- + .ta 0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i
- ..
- *** ../mh-6.7.2/conf/doc/vmh.rf Thu Apr 5 16:05:08 1990
- --- conf/doc/vmh.rf Tue May 12 15:23:57 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: vmh.rf,v 1.5 90/04/05 15:15:32 sources Exp $
- .SC VMH 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: vmh.rf,v 1.6 1992/05/12 22:23:34 jromine Exp $
- .SC VMH 1
- ***************
- *** 4,6 ****
- .NA
- ! vmh \- visual front\-end to MH
- .SY
- --- 4,6 ----
- .NA
- ! vmh \- visual front-end to MH
- .SY
- *** ../mh-6.7.2/conf/doc/whatnow.rf Tue Dec 18 15:44:41 1990
- --- conf/doc/whatnow.rf Fri Oct 16 14:36:33 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: whatnow.rf,v 1.7 90/12/18 15:44:22 mh Exp $
- .SC WHATNOW 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: whatnow.rf,v 1.9 1992/10/16 21:36:30 jromine Exp $
- .SC WHATNOW 1
- ***************
- *** 4,6 ****
- .NA
- ! whatnow \- prompting front\-end for send
- .SY
- --- 4,6 ----
- .NA
- ! whatnow \- prompting front-end for send
- .SY
- ***************
- *** 91,92 ****
- --- 91,97 ----
- .Ps
- + @BEGIN: MIME
- + ^automhnproc:~^Program to automatically run prior to sending
- + ^~^if the draft is an \fImhn\fR composition file
- + .Ps
- + @END: MIME
- ^fileproc:~^Program to refile the message
- *** ../mh-6.7.2/conf/doc/whom.rf Thu Apr 5 16:04:36 1990
- --- conf/doc/whom.rf Mon Feb 10 16:48:09 1992
- ***************
- *** 1,3 ****
- .\" @(MHWARNING)
- ! .\" @(#)$Id: whom.rf,v 1.6 90/04/05 15:10:01 sources Exp $
- .SC WHOM 1
- --- 1,3 ----
- .\" @(MHWARNING)
- ! .\" @(#)$Id: whom.rf,v 1.7 1992/02/11 00:47:53 jromine Exp $
- .SC WHOM 1
- ***************
- *** 24,26 ****
-
- ! The file specified by the profile entry \*(lqAliasfile:\*(rq and any
- additional alias files given by the `\-alias aliasfile' switch will be read
- --- 24,26 ----
-
- ! The files specified by the profile entry \*(lqAliasfile:\*(rq and any
- additional alias files given by the `\-alias aliasfile' switch will be read
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/README Mon Dec 14 10:12:32 1992
- ***************
- *** 0 ****
- --- 1,44 ----
- + $Id: README,v 1.8 1992/12/14 18:12:18 jromine Exp $
- + These files are contributed MH config files from various sites.
- + Newer files give the version of MH and OS release number which
- + they are configured for.
- +
- + # aix.sap-ag.de - MH 6.8 options for AIX (AIX 3.2 on RS/6000 350).
- + # aix31.rpi.edu - MH 6.8, RS6000 AIX 3.1 with AFS Kerberos
- + # aos.cornell.edu - MH 6.8 Configuration for IBM/PC-RT running IBM/4.3
- + # aux.rand.org - MH 6.8 under AUX in SYS5 mode
- + # bsd43.uiuc.edu - MH 6.8 VAX running 4.3 BSD-reno
- + # convex.uiuc.edu - MH 6.8 Convex C240 running ConvexOS v9.1
- + # dbc - DBC's MH 6.8 config file
- + # dynix.uiuc.edu - MH 6.8 Sequent Symmetry running Dynix 3.1.2
- + # encore
- + # fujitsu.clcs.com.au - MH 6.8 for Fujitsu/ICL DRS6000 running System V R4
- + # gould
- + # hplpm.hpl.hp.com - Hewlett-Packard 9000 machines
- + # hpux.sap-ag.de - MH 6.8 options for HPUX (HPUX 8.05 on HP9000/720).
- + # hpux.uiuc.edu - MH 6.8 HP-9000/700 with HP-UX 8.0 and sendmail
- + # kosciusko.esd.3com.com - SunOS 4.0.3
- + # krusty.smsc.sony.COM - System V Release 4 running mailsurr
- + # mhmts - stand-alone mhmts template
- + # mmdf - template using mts: mmdf
- + # ridge - ROS
- + # rs6000 - RISC 6000/320, with AIX 3.1 (3.03)
- + # sendmail - template using mts: sendmail
- + # shrike.irvine.com - MH 6.7.2 - HP 9000/700 HP/UX 8.x sendmail version
- + # solaris2.sun.com - MH 6.8 - Solaris 2.x
- + # sun3.5 - MH 6.8 configuration file for SunOS 3.5
- + # sun4.0 - For Sun OS 4.* with SendMail, Yellow Pages and /etc/named.
- + # sun4.1.1 - MH 6.8 configuration file for SunOS 4.1.1
- + # sun411.rpi.edu - MH 6.8, Sparcstation SunOS 4.1.1 with AFS Kerberos
- + # sys5r3.2 - SVr3.2 configuration file for MH 6.7.1:
- + # sys5r4 - a SYS5 R4 system
- + # sys5r4-ncr - an NCR system: Unix System V Release 4.0.2.0 (WINS)
- + # system5 - template
- + # uci.gcc - MH 6.8 - Sun3 or Sun4 running Sun OS 4.1
- + # uci.hp-pa - MH 6.8 options for HPUX (HPUX 8.05 on HP9000/720).
- + # uci.sequent - MH 6.8 - Sequent running Dynix 3.1
- + # uci.sun - MH 6.8 - Sun3 or Sun4 running Sun OS 4.1
- + # uci.sun.debug - MH 6.8 - Sun3 or Sun4 running Sun OS 4.1
- + # udel - UDel template
- + # ultrix.sap-ag.de - MH 6.8 options for ULTRIX (ULTRIX 4.2 on RISC).
- +
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/aix.sap-ag.de Thu Dec 3 09:30:37 1992
- ***************
- *** 0 ****
- --- 1,18 ----
- + # aix.sap-ag.de - MH 6.8 options for AIX (AIX 3.2 on RS/6000 350).
- + # Bill Wohler <wohler@sap-ag.de>
- + # Sat, 31 Oct 92 18:45:00 +0100
- + #
- + # General
- + #
- + bin /usr/local/bin/mh
- + ldoptions -s
- + mandir /usr/local/man
- + manuals standard
- + mts sendmail/smtp
- + options BIND DBMPWD ISI MHE MHRC OVERHEAD RPATHS WHATNOW UK
- + #
- + # Machine specific options
- + #
- + options TYPESIG=void SYS5 SYS5DIR SOCKETS
- + curses -lcurses
- + sprintf int
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/aix31.rpi.edu Fri Dec 4 09:14:24 1992
- ***************
- *** 0 ****
- --- 1,37 ----
- + # aix31.rpi.edu - MH 6.8, RS6000 AIX 3.1 with AFS Kerberos
- + # Thu, 03 Dec 1992 13:45:09
- + # James Ault <aultj@rpi.EDU>
- + #
- + bin /campus/other/mh/6.7.1k/@sys/bin
- + debug off
- + etc /campus/other/mh/6.7.1k/@sys/lib
- + mail /usr/spool/mail
- + mailgroup off
- + mandir /campus/other/mh/6.7.1k/@sys/man
- + manuals standard
- + chown /bin/chown
- + editor prompter
- + remove mv -f
- + mts sendmail
- + bboards off
- + bbdelivery off
- + mf off
- + pop on
- + kpop on
- + hesiod off
- + options ATHENA ATZ BIND DBM DUMB FOLDPROT='"0711"' FLOCK
- + options MHE MHRC MORE='"/usr/bin/more"' MSGPROT='"0600"'
- + options NOMHSEQ OVERHEAD POP2 POPSERVICE='"kpop"' RPATHS
- + options RPOP SBACKUP='"\\043"' SOCKETS SYS5 SYS5DIR
- + options TYPESIG='void' TZNAME VSPRINTF YP_LOOKUP
- + options AIX AIX3_1 ISI WP NETWORK KPOP TRANSARC_KAS
- + ccoptions -O -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void -U__STR__
- + ccoptions -I/campus/athena/kerberos/V4/@sys/include
- + curses -lcurses
- + ldoptlibs -ldbm
- + ldoptlibs -L/campus/athena/kerberos/V4/@sys/lib -ldes -lkrb
- + ldoptlibs -lbsd
- + ranlib on
- + sprintf int
- + sharedlib off
- +
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/aos.cornell.edu Thu Dec 3 09:30:45 1992
- ***************
- *** 0 ****
- --- 1,36 ----
- + # aos.cornell.edu - MH 6.8 Configuration for IBM/PC-RT running IBM/4.3
- + # Jeffrey C Honig <jch@nr-tech.cit.cornell.EDU>
- + # Wed, 02 Dec 92 14:55:44 -0500
- + #
- + # Configuration for IBM/PC-RT running IBM/4.3
- + #
- + #
- + # System stuff
- + #
- + bin /usr/local/bin
- + ccoptions -U__STDC__
- + chown /etc/chown
- + editor prompter
- + etc /usr/local/lib/mh
- + mail /usr/spool/mail
- + mandir /usr/local/man
- + manuals standard
- + mts sendmail/smtp
- + mf off
- + options BSD42 BSD43 BIND NTOHLSWAP DBMPWD LOCKF ZONEINFO
- + options UCI
- + options RENAME
- + signal int
- + #
- + # Options
- + #
- + bboards off
- + options MHE MHRC MIME MSGID
- + options SBACKUP='"\\043"'
- + remove mv -f
- + #
- + # POP
- + #
- + pop on
- + popdir /usr/local/sbin
- + options RPOP POPSERVICE='"pop3"' DPOP APOP
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/aux.rand.org Thu Dec 3 09:35:43 1992
- ***************
- *** 0 ****
- --- 1,34 ----
- + # aux.rand.org - MH 6.8 under AUX in SYS5 mode
- + # Jim Guyton <guyton@condor.rand.ORG>
- + # Thu, 05 Nov 1992 13:59:48 PST
- + #
- + # Note that I don't know what the default locking is on this system.
- + # Iswitched my sendmail to use 'miscellany/sendmail/spooler.c' so that
- + # I could be sure that inc and the delivery program both use the same
- + # lock. Also note that I'm just starting to use MH on this system and
- + # so this may not be optimal.
- + #
- + bin /usr/local/bin
- + etc /usr/local/lib/mh
- + mail /usr/spool/mail
- + mandir /usr/local/man
- + manuals standard
- + chown /bin/chown
- + remove mv -f
- + cc cc
- + ccoptions -ZS -A 2
- + curses -lcurses -ltermcap
- + ldoptions -s
- + ranlib off
- + sprintf int
- + mts sendmail/smtp
- + signal int
- +
- + # options BIND
- + options AUX
- + options DUMB FLOCK MHRC
- + options MIME NFS
- + options MORE='"/bin/more"' MSGID
- + options OVERHEAD RENAME RPATHS
- + options SOCKETS SYS5 SYS5DIR
- + options VSPRINTF
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/bsd43.uiuc.edu Mon Dec 14 10:07:37 1992
- ***************
- *** 0 ****
- --- 1,39 ----
- + # bsd43.uiuc.edu - MH 6.8 VAX running 4.3 BSD-reno
- + # Paul Pomes - UofIllinois CSO <Paul-Pomes@uiuc.EDU>
- + # Fri, 11 Dec 1992 22:28:58 -0600
- + #
- + bboards off
- + bin /usr/local/bin
- + cc gcc -fpcc-struct-return
- + etc /usr/local/libdata/mh
- + ldoptlibs -lcompat
- + lex /usr/old/lex -nt
- + mail /var/spool/mail
- + mandir /usr/local/src/man
- + manuals standard
- + mts sendmail/smtp
- + pop off
- + ranlib on
- + remove rm -f
- + signal void
- + sprintf int
- + options BIND
- + options BSD42
- + options BSD43
- + options DBMPWD
- + options DUMB
- + options FLOCK
- + options FOLDPROT='"700"'
- + options MHE
- + options MHRC
- + options MIME
- + options MSGID
- + options MSGPROT='"600"'
- + options NTOHLSWAP
- + options OVERHEAD
- + options RENAME
- + options RPATHS
- + options SBACKUP='"\\043"'
- + options UNISTD
- + options VSPRINTF
- + options ZONEINFO
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/convex.uiuc.edu Mon Dec 14 16:01:16 1992
- ***************
- *** 0 ****
- --- 1,38 ----
- + # convex.uiuc.edu - MH 6.8 Convex C240 running ConvexOS v9.1
- + # Fri, 11 Dec 1992 17:32:53 -0600
- + # Paul Pomes <Paul-Pomes@uiuc.EDU>
- + #
- + bboards off
- + bin /usr/local/new
- + etc /usr/local/libdata/mh
- + mail /usr/spool/mail
- + mandir /usr/man
- + manuals local
- + manuals standard
- + mts sendmail/smtp
- + pop off
- + ranlib on
- + remove rm -f
- + signal void
- + sprintf char *
- + options BIND
- + options BSD42
- + options BSD43
- + options DBMPWD
- + options DUMB
- + options FLOCK
- + options FOLDPROT='"700"'
- + options MHE
- + options MHRC
- + options MIME
- + options MSGID
- + options MSGPROT='"600"'
- + options NFS
- + options NTOHLSWAP
- + options OVERHEAD
- + options RENAME
- + options RPATHS
- + options SBACKUP='"\\043"'
- + options UNISTD
- + options VSPRINTF
- + options WAITINT
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/dbc Wed Dec 2 13:35:15 1992
- ***************
- *** 0 ****
- --- 1,23 ----
- + # dbc - DBC's MH 6.8 config file
- + # SunOS 4.1.1 rev B
- + # Wed, 02 Dec 1992 12:40:42 PST
- + # Marshall Rose <mrose@dbc.mtview.ca.us>
- + #
- + options SUN40 BSD42 BSD43
- + options BIND MIME MSGID RPATHS UCI WHATNOW
- + #
- + bboards pop
- + bin /usr/local/bin
- + curses -lcurses -ltermcap
- + etc /usr/local/lib/mh
- + ldoptions -s -O
- + mail .maildrop
- + mandir /usr/local/man
- + manuals standard
- + editor prompter
- + mts zmailer/smtp
- + pop on
- + options APOP='"/etc/pop.auth"' MPOP
- + options POPSERVICE='"pop3"'
- + ranlib on
- + signal void
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/dynix.uiuc.edu Fri Dec 11 13:33:20 1992
- ***************
- *** 0 ****
- --- 1,36 ----
- + # dynix.uiuc.edu - MH 6.8 Sequent Symmetry running Dynix 3.1.2
- + # Fri, 11 Dec 1992 14:06:09 CST
- + # Paul Pomes <Paul-Pomes@uiuc.EDU>
- + #
- + bin /usr/local/new
- + bboards off
- + cc gcc -fpcc-struct-return
- + etc /usr/local/libdata/mh
- + mail /usr/spool/mail
- + mandir /usr/man
- + manuals local
- + mts sendmail/smtp
- + pop off
- + remove rm -f
- + ranlib on
- + signal int
- + sprintf char *
- + options BIND
- + options BSD42
- + options BSD43
- + options DUMB
- + options FLOCK
- + options FOLDPROT='"700"'
- + options MHE
- + options MHRC
- + options MIME
- + options MSGID
- + options MSGPROT='"600"'
- + options NTOHLSWAP
- + options OVERHEAD
- + options RENAME
- + options RPATHS
- + options SBACKUP='"\\043"'
- + options UNISTD
- + options VSPRINTF
- + options ZONEINFO
- *** ../mh-6.7.2/conf/examples/encore Fri Apr 6 09:21:02 1990
- --- conf/examples/encore Fri Dec 4 09:17:57 1992
- ***************
- *** 1 ****
- --- 1,2 ----
- + # encore
- bin /usr/local
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/fujitsu.clcs.com.au Thu Dec 10 11:47:28 1992
- ***************
- *** 0 ****
- --- 1,28 ----
- + # fujitsu.clcs.com.au - MH 6.8 for Fujitsu/ICL DRS6000 running System V R4
- + # [This is known to work with OS Versions: 4.03 and 5.1.04]
- + #
- + # From: Stephen Prince <sp@clcs.com.au>
- + # Date: Tue, 08 Dec 1992 10:47:02 +1100
- + #
- + bin /usr/local/bin/mh
- + etc /usr/local/lib/mh
- + bboards off
- + mail /var/mail
- + mailgroup mail
- + manuals gen
- + mandir /usr/local/man
- + mts sendmail/smtp
- + options ATTVIBUG BIND FCNTL SYS5 SYS5DIR SVR4 NFS
- + options SOCKETS SHADOW BERK MHRC MIME RPATHS RENAME
- + options VSPRINTF ZONEINFO FOLDPROT='"0750"' UNISTD
- + options MORE='"/usr/local/bin/less"'
- + signal void
- + pop off
- + ranlib off
- + oldload none
- + curses -lcurses
- + ldoptlibs -lsocket -lnsl
- + ccoptions -O -I/usr/include -I/usr/ucbinclude
- + sharedlib sys5
- + slibdir /usr/lib
- + slflags -K pic
- *** ../mh-6.7.2/conf/examples/gould Thu Oct 29 14:55:39 1987
- --- conf/examples/gould Fri Dec 4 09:18:01 1992
- ***************
- *** 1 ****
- --- 1,2 ----
- + # gould
- bin /usr/local
- *** ../mh-6.7.2/conf/examples/hplpm.hpl.hp.com Thu Apr 12 13:21:53 1990
- --- conf/examples/hplpm.hpl.hp.com Thu Dec 3 09:31:08 1992
- ***************
- *** 1 ****
- --- 1,2 ----
- + # hplpm.hpl.hp.com - Hewlett-Packard 9000 machines
- # From: Peter Marvit <marvit%hplpm.hpl.hp.com@hplb.hpl.hp.COM>
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/hpux.sap-ag.de Thu Dec 3 09:31:34 1992
- ***************
- *** 0 ****
- --- 1,19 ----
- + # hpux.sap-ag.de - MH 6.8 options for HPUX (HPUX 8.05 on HP9000/720).
- + # Bill Wohler <wohler@sap-ag.de>
- + # Sat, 31 Oct 92 19:16:29 +0100
- + #
- + # General
- + #
- + bin /usr/local/bin/mh
- + ldoptions -s
- + mandir /usr/local/man
- + manuals standard
- + mts sendmail/smtp
- + options BIND DBMPWD ISI MHE MHRC OVERHEAD RPATHS WHATNOW UK
- + #
- + # Machine specific options
- + #
- + ccoptions +DA1.0 +DS1.0
- + options TYPESIG=void SYS5 NDIR SOCKETS _STRINGS
- + curses -lcurses -ltermlib
- + sprintf int
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/hpux.uiuc.edu Fri Dec 11 13:33:12 1992
- ***************
- *** 0 ****
- --- 1,41 ----
- + # hpux.uiuc.edu - MH 6.8 HP-9000/700 with HP-UX 8.0 and sendmail
- + # Fri, 11 Dec 1992 14:06:09 CST
- + # Paul Pomes <Paul-Pomes@uiuc.EDU>
- + #
- + bin /usr/local/bin
- + bboards off
- + etc /usr/local/lib/mh
- + ldoptlibs -ldbm
- + mail /usr/mail
- + mandir /usr/local/man
- + mailgroup mail
- + manuals standard
- + mts sendmail/smtp
- + pop off
- + remove rm -f
- + signal void
- + sprintf int
- + options BIND
- + options DBMPWD
- + options DUMB
- + options FOLDPROT='"700"'
- + options LOCKF
- + options MHE
- + options MHRC
- + options MIME
- + options MORE='"/usr/bin/more"'
- + options MSGID
- + options MSGPROT='"600"'
- + options OVERHEAD
- + options RENAME
- + options RPATHS
- + options SBACKUP='"\\043"'
- + options SOCKETS
- + options SVR4
- + options SYS5
- + options SYS5DIR
- + options TERMINFO
- + options TZNAME
- + options UNISTD
- + options VSPRINTF
- + options NTOHLSWAP
- *** ../mh-6.7.2/conf/examples/kosciusko.esd.3com.com Sun Apr 8 12:59:55 1990
- --- conf/examples/kosciusko.esd.3com.com Thu Dec 3 09:31:51 1992
- ***************
- *** 1 ****
- --- 1,2 ----
- + # kosciusko.esd.3com.com - SunOS 4.0.3
- # From: "Mark D. Baushke" <mdb@kosciusko.ESD.3Com.COM>
- ***************
- *** 29,31 ****
- options BSD42 BSD43 SUN40 DUMB ATHENA
- ! options MHE MHRC NFS BIND DBM
- options SBACKUP='"\\043"' OVERHEAD
- --- 30,32 ----
- options BSD42 BSD43 SUN40 DUMB ATHENA
- ! options MHE MHRC NFS BIND DBMPWD
- options SBACKUP='"\\043"' OVERHEAD
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/krusty.smsc.sony.COM Thu Dec 3 09:32:02 1992
- ***************
- *** 0 ****
- --- 1,22 ----
- + # krusty.smsc.sony.COM - System V Release 4 running mailsurr
- + #
- + # David Elliott 1990, 1991
- + #
- + #
- + bin /usr/local/bin/mh
- + etc /usr/local/lib/mh
- + mail /usr/mail
- + chown /bin/chown
- + manuals gen
- + mts sendmail/smtp
- + sprintf int
- + ldoptlibs -lsocket -lnsl -lgen
- + curses -lcurses
- + ranlib off
- + options ATTVIBUG
- + options MORE='"/bin/more"'
- + options SOCKETS
- + options SYS5
- + options SYS5DIR
- + options SVR4
- + options TYPESIG=void
- *** ../mh-6.7.2/conf/examples/mhmts Fri Apr 6 09:22:28 1990
- --- conf/examples/mhmts Thu Dec 3 09:39:28 1992
- ***************
- *** 1 ****
- --- 1,2 ----
- + # mhmts - stand-alone mhmts template
- bin /usr/local
- *** ../mh-6.7.2/conf/examples/mmdf Fri Apr 6 09:22:32 1990
- --- conf/examples/mmdf Thu Dec 3 09:39:12 1992
- ***************
- *** 1 ****
- --- 1,2 ----
- + # mmdf - template using mts: mmdf
- bin /usr/local
- *** ../mh-6.7.2/conf/examples/ridge Fri Apr 6 09:23:35 1990
- --- conf/examples/ridge Fri Dec 4 09:18:06 1992
- ***************
- *** 1 ****
- --- 1,2 ----
- + # ridge - ROS
- bin /usr/local/bin
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/rs6000 Thu Dec 3 09:32:23 1992
- ***************
- *** 0 ****
- --- 1,34 ----
- + # rs6000 - RISC 6000/320, with AIX 3.1 (3.03)
- + #
- + bin /usr/local/bin
- + etc /usr/local/lib/mh
- + chown /bin/chown
- + mail /usr/spool/mail
- + mandir /usr/local/man
- + manuals standard
- + mts sendmail/smtp
- + pop off
- + options AIX AIX3_1 TYPESIG=void SYS5 SYS5DIR
- + options ATZ
- + options BIND
- + options DBMPWD
- + options MHE
- + options MHRC
- + options NETWORK
- + options NTOHLSWAP
- + options OVERHEAD
- + options RPATHS
- + options SOCKETS
- + options TZNAME
- + options WHATNOW
- + options SBACKUP='"\\043"'
- + options MSGPROT='"0600"'
- + options FOLDPROT='"0710"'
- + options NFOLDERS=500
- + bboards off
- + curses -lcurses
- + ccoptions -g -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void -U__STR__
- + ldoptions -g
- + ranlib on
- + sprintf int
- +
- *** ../mh-6.7.2/conf/examples/sendmts Fri Apr 6 09:22:36 1990
- --- conf/examples/sendmts Thu Dec 3 09:39:21 1992
- ***************
- *** 1 ****
- --- 1,2 ----
- + # sendmail - template using mts: sendmail
- bin /usr/local
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/shrike.irvine.com Thu Dec 3 09:32:33 1992
- ***************
- *** 0 ****
- --- 1,50 ----
- + # shrike.irvine.com - MH 6.7.2 - HP 9000/700 HP/UX 8.x sendmail version
- + # contributed by Jerry Sweet <jsweet@irvine.COM>
- + #
- + # Notes:
- + # 1. Make sure you're using /bin/make, and not GNU Make.
- + #
- + # 2. You may have to modify h/string.h where strlen is declared as follows:
- + #
- + # #if defined(hpux)
- + # /* size_t strlen (); */
- + # #else
- + # int strlen ();
- + # #endif
- + #
- + # 3. vmh.c won't compile. (Sorry, don't have any patches yet for that.)
- + #
- + #
- + bin /usr/local/bin/mh-6.7.2
- + etc /usr/local/lib/mh-6.7.2
- + mail /usr/spool/mail
- + mandir /usr/local/man
- + manuals standard
- + chown /bin/chown
- + editor prompter
- + remove mv -f
- + mts sendmail/smtp
- + pop on
- + options ATHENA
- + options ATZ
- + options BIND
- + options MHE
- + options MHRC
- + options MORE='"/usr/bin/more"'
- + options MSGPROT='"0600"'
- + options NDIR
- + options NTOHLSWAP
- + options POPUUMBOX
- + options SOCKETS
- + options SYS5
- + options TZNAME
- + options TYPESIG=void
- + options VSPRINTF
- + options WHATNOW
- + options DPOP
- + options RPOP
- + options POP2
- + options POPSERVICE='"pop3"'
- + ccoptions -O
- + curses -lcurses -ltermlib
- + sprintf int
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/solaris2.sun.com Thu Dec 3 09:32:46 1992
- ***************
- *** 0 ****
- --- 1,54 ----
- + # solaris2.sun.com - MH 6.8 - Solaris 2.x
- + # Solaris 2.x (native, no source/binary compatability)
- + # contributed by Greg.Onufer@cheers.Bungi.COM
- + # Wed, 11 Nov 1992 00:43:19 PST
- +
- + # Bulletin Boards
- + bbdelivery off
- + bboards off
- +
- + # Compilation Environment
- + cc cc
- + ccoptions -O -g
- + curses -lcurses
- + # ldoptions may also need -R/opt/mh/lib
- + ldoptions -s
- + ldoptlibs -lnsl -lsocket
- + sharedlib sys5
- + slflags -K pic
- + ranlib off
- + chown /usr/bin/chown
- + oldload none
- +
- + # RunTime Environment
- + bin /opt/mh/bin
- + etc /opt/mh/lib
- + slibdir /opt/mh/lib
- + mandir /opt/mh/man
- + manuals standard
- + editor /usr/bin/vi
- + mail /var/mail
- + mts sendmail/smtp
- +
- + # Compilation Options
- + options SYS5
- + options SVR4
- + options FCNTL
- + options RENAME
- + options VSPRINTF
- + options ATTVIBUG
- + options DBMPWD
- + options DUMB
- + options MORE='"/usr/bin/more"'
- + options MSGPROT='"0600"'
- + options MSGID
- + options RPATHS
- + options SOCKETS
- + options FOLDPROT='"0711"'
- + options SHADOW
- + options SYS5DIR
- + options MHRC
- + options MHE
- + options MIME
- + signal void
- + sprintf int
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/sun3.5 Thu Dec 3 09:33:01 1992
- ***************
- *** 0 ****
- --- 1,40 ----
- + # sun3.5 - MH 6.8 configuration file for SunOS 3.5
- + # Fri, 28 Feb 1992 00:49:32 -0800
- + # Casey Leedom <casey@gauss.llnl.GOV>
- + #
- +
- + #
- + # Options required by SunOS 3.5. (You can use FLOCK instead of LOCKF
- + # if you don't have multiple machine mounting mail spools with NFS.)
- + #
- + mts sendmail/smtp
- + options BIND BSD42 DBMPWD LOCKF
- + curses -lcurses -ltermcap
- + sprintf int
- +
- + #
- + # Site preference options.
- + #
- + # Note that if you choose not to use the option "BERK" and you use Domain
- + # Name Service via NIS, then you'd better add "ldoptlibs -lresolv" to
- + # prevent post(1) from hanging on hosts with MX records and no address
- + # records. (No, you really don't want to know why.)
- + #
- + # Also, under SunOS 3.5 you'll need to add "ccoptions -I../h -I../../h
- + # -I../../../h" because the supplied libresolv.a under SunOS 3.5 uses the
- + # newer BSD4.3 based hostent structure which is different from the BSD4.2
- + # based hostent structure declared in /usr/include/netdb.h. Why does adding
- + # this help? There's a version of netdb.h in ../h that has the BSD4.3 based
- + # hostent structure. We need to use all the different forms of ../h because
- + # the MH makefile system doesn't offer a $(TOP) variable like the X Windows
- + # Makefile system ... (sigh) I told you that you didn't want to know about
- + # any of this ...
- + #
- + bin /usr/local/bin/mh
- + etc /usr/local/lib/mh
- + mail /usr/spool/mail
- + manuals local
- + options FOLDPROT='"0700"' MHE MHRC MSGPROT='"0644"' NTOHLSWAP OVERHEAD RPATHS
- + ldoptions -s
- + ldoptlibs -lresolv
- + ccoptions -I../h -I../../h -I../../../h
- *** ../mh-6.7.2/conf/examples/sun4.0 Fri Apr 6 09:44:46 1990
- --- conf/examples/sun4.0 Thu Dec 3 09:33:20 1992
- ***************
- *** 1,2 ****
- ! # For Sun OS 4.* with SendMail, running Yellow Pages, and /etc/named.
- # MH will post mail through an SMTP connection to the localhost's
- --- 1,2 ----
- ! # sun4.0 - For Sun OS 4.* with SendMail, Yellow Pages and /etc/named.
- # MH will post mail through an SMTP connection to the localhost's
- ***************
- *** 11,13 ****
- options BSD42 BSD43 SUN40 TYPESIG=void
- ! options DBM
- options BIND
- --- 11,13 ----
- options BSD42 BSD43 SUN40 TYPESIG=void
- ! options DBMPWD
- options BIND
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/sun4.1.1 Thu Dec 3 09:33:29 1992
- ***************
- *** 0 ****
- --- 1,29 ----
- + # sun4.1.1 - MH 6.8 configuration file for SunOS 4.1.1
- + # Fri, 28 Feb 1992 00:49:32 -0800
- + # Casey Leedom <casey@gauss.llnl.GOV>
- + #
- +
- + #
- + # Options required by SunOS 4.1.1. (You can use FLOCK instead of LOCKF
- + # if you don't have multiple machine mounting mail spools with NFS.)
- + #
- + mts sendmail/smtp
- + options ATTVIBUG BIND BSD42 BSD43 DBMPWD
- + options LOCKF SUN40 SUN41 TYPESIG=void ZONEINFO
- + curses -lcurses -ltermcap
- +
- + #
- + # Site preference options.
- + #
- + # Note that if you choose not to use the option "BERK" and you use Domain
- + # Name Service via NIS, then you'd better add "ldoptlibs -lresolv" to
- + # prevent post(1) from hanging on hosts with MX records and no address
- + # records. (No, you really don't want to know why.)
- + #
- + bin /usr/local/bin/mh
- + etc /usr/local/lib/mh
- + mail /usr/spool/mail
- + manuals local
- + options FOLDPROT='"0700"' MHE MHRC MSGPROT='"0644"' NTOHLSWAP OVERHEAD RPATHS
- + ldoptions -s
- + ldoptlibs -lresolv
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/sun411.rpi.edu Fri Dec 4 09:15:40 1992
- ***************
- *** 0 ****
- --- 1,35 ----
- + # sun411.rpi.edu - MH 6.8, Sparcstation SunOS 4.1.1 with AFS Kerberos
- + # Thu, 03 Dec 1992 13:45:09
- + # James Ault <aultj@rpi.EDU>
- + #
- + bin /campus/other/mh/6.7.1k/@sys/bin
- + etc /campus/other/mh/6.7.1k/@sys/lib
- + mail /usr/spool/mail
- + mailgroup off
- + mandir /campus/other/mh/6.7.1k/@sys/man
- + manuals standard
- + chown /etc/chown
- + editor prompter
- + remove mv -f
- + mts sendmail
- + bboards off
- + bbdelivery off
- + mf off
- + pop on
- + kpop on
- + hesiod off
- + options ATHENA ATTVIBUG ATZ BIND BSD42 BSD43 DBM DUMB
- + options FOLDPROT='"0711"' FLOCK MHE MHRC MSGPROT='"0600"'
- + options NOMHSEQ OVERHEAD POP2 POPSERVICE='"kpop"' RPATHS
- + options RPOP KPOP TRANSARC_KAS SBACKUP='"\\043"'
- + options SUN40 SUN41 TYPESIG='void' TZNAME ZONEINFO
- + options ISI WP YP_LOOKUP
- + ccoptions -O -I/campus/athena/kerberos/V4/@sys/include
- + curses -lcurses -ltermcap
- + ldoptions -n
- + ldoptlibs -L/campus/athena/kerberos/V4/@sys/lib -lkrb -ldes
- + ldoptlibs -L/campus/bsd/bind/4.8.3/@sys/lib -lresolv
- + lex lex -nt
- + sprintf int
- + ranlib on
- + sharedlib off
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/sys5r3.2 Thu Dec 3 09:33:38 1992
- ***************
- *** 0 ****
- --- 1,60 ----
- + # sys5r3.2 - SVr3.2 configuration file for MH 6.7.1:
- +
- + #
- + # conf/MH configuration file for MH-6.7 to be used on:
- + # AT&T Unix System V.3.2 with BSD4.3-compatible sockets
- + #
- + # the items are listed in the order they appear in mh-gen(8)
- + #
- +
- + bin /usr/local/bin
- + debug off
- + etc /usr/local/lib/mh
- + mail /usr/mail
- + mailgroup mail
- + mandir /usr/man
- + manuals gen
- + chown /bin/chown
- + editor prompter
- + remove /bin/mv -f
- + # if no TCP/IP sendmail is available: change mts entry to sendmail
- + mts sendmail/smtp
- + bboards off
- + bbdelivery off
- + bbhome /usr/spool/bboards
- + mf off
- + pop off
- + # options SEE BELOW
- + cc cc
- + ccoptions -O
- + curses -lcurses
- + ldoptions -s
- + ldoptlibs
- + lex lex
- + sprintf int
- + sharedlib off
- + slibdir /usr/local/lib
- + oldload off
- + ranlib off
- + tma off
- +
- + #
- + # complete list of possible macros for use with 'options':
- + # ALTOS ATHENA ATZ BANG BERK BIND BSD41A BSD42 BSD43 COMPAT
- + # DBMPWD DPOP DUMB FOLDPROT='"0711"' ISI LINK='"@"' locname
- + # MHE MHRC MORE='"/usr/ucb/more"' MSGPROT='"0644"' NDIR NFS
- + # NOIOCTLH NOMHSEQ NTOHLSWAP OVERHEAD POPSERVICE='"pop"'
- + # RPATHS RPOP SBACKUP='","' SENDMAILBUG SHADOW SOCKETS
- + # SUN40 SYS5 SYS5DIR TTYD TYPESIG='int' TZNAME UCI UK V7 WP
- + # WHATNOW ZONEINFO
- + #
- +
- + # define BIND only of the BSD4.3 named (TCP/IP) is used
- + # define SOCKETS only if the system has BSD4.3 sockets (TCP/IP)
- + options ATZ BIND DUMB MHE MHRC MORE='"/usr/bin/pg"'
- + options OVERHEAD SHADOW SOCKETS SYS5 SYS5DIR
- + options TYPESIG='void' TZNAME WHATNOW
- +
- + #
- + # end of conf/MH configuration file
- + #
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/sys5r4 Thu Dec 3 09:33:44 1992
- ***************
- *** 0 ****
- --- 1,28 ----
- + # sys5r4 - a SYS5 R4 system
- + # contributed by andrew@werple.pub.uu.oz.au
- + #
- + bin /usr/local/bin
- + etc /usr/local/lib/mh
- + bboards on
- + chown /usr/bin/chown
- + editor /usr/bin/vi
- + mail /var/mail
- + mandir /usr/local/man
- + manuals local
- + mts sendmail
- + options BSD42
- + options MORE='"/usr/local/bin/less"'
- + options MSGPROT='"0600"'SHADOW
- + options SYS5
- + options SVR4
- + options SYS5DIR
- + options TYPESIG=void
- + options UK
- + options on
- + sprintf int
- + cc cc
- + ccoptions -O
- + ldoptions -s
- + curses -lcurses
- + sharedlib sys5
- + slibdir /usr/local/lib/mh
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/sys5r4-ncr Thu Dec 3 09:33:51 1992
- ***************
- *** 0 ****
- --- 1,34 ----
- + # sys5r4-ncr - an NCR system: Unix System V Release 4.0.2.0 (WINS)
- + # running MMDF2 with SMTP posting
- + #
- + # Apparently, there are two compilation environments: 4.2BSD and SYS5.
- + # This config file uses the SYS5 environment -- I never could get the
- + # 4.2BSD environment directory routines to work right.
- + #
- + # You may want to define SVR4; this option was added after MH was
- + # ported to the NCR, and I haven't been able to test it there.
- + #
- + # uip/vmh.c still won't compile because of loader problems with the
- + # curses & termlib libraries. Also, NCR should fix their loader not to try
- + # to search additional libraries for modules that have already been found.
- + #
- + bin /usr/local
- + etc /usr/local/lib/mh
- + mail .mail
- + manuals gen
- + chown /usr/bin/chown
- + mts mmdf2/smtp
- + mf off
- + ranlib off
- + bboards off
- + bbdelivery off
- + oldload none
- + cc /bin/cc
- + ldoptlibs -lnet -lnsl -lsocket
- + options MORE='"/usr/bin/more"'
- + options ncr
- + options SYS5
- + options SYS5DIR
- + options SOCKETS
- + options TZNAME
- + options TYPESIG=void
- *** ../mh-6.7.2/conf/examples/system5 Fri Apr 6 09:23:13 1990
- --- conf/examples/system5 Fri Dec 4 09:18:48 1992
- ***************
- *** 1 ****
- --- 1,2 ----
- + # system5 - template
- bin /usr/local
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/uci.gcc Thu Dec 3 09:34:15 1992
- ***************
- *** 0 ****
- --- 1,49 ----
- + # uci.gcc - MH 6.8 - Sun3 or Sun4 running Sun OS 4.1
- + #
- + bin /usr/bs/mh-6.8/bin
- + etc /usr/bs/mh-6.8/lib
- + popdir /usr/bs/mh-6.8/lib
- + mandir /usr/bs/mh-6.8/man
- + slibdir /usr/bs/mh-6.8/lib
- + bbhome /usr/bs/mh-6.8/bboards
- + mail /usr/spool/mail
- + mailgroup off
- + manuals none
- + chown /etc/chown
- + editor prompter
- + remove rm -f
- + mts mmdf2/smtp
- + bboards nntp
- + bbdelivery off
- + mf off
- + pop on
- + options BIND
- + options BSD42
- + options BSD43
- + #options LOCKF
- + options MHE
- + options MHRC
- + options RPATHS
- + options WHATNOW
- + options MIME
- + options UCI
- + options POP2
- + options RPOP
- + #options APOP
- + curses -lcurses -ltermcap
- + ranlib on
- + # Sun specifics
- + #options TYPESIG=void
- + signal void
- + options DBMPWD
- + options NFS
- + options SUN40
- + options ATTVIBUG
- + #options MPOP
- + #options ZONEINFO
- + #
- + #cc /usr/bs/sunc/cc
- + cc /usr/gnu/bin/gcc -ansi -fpcc-struct-return
- + ldoptions -s
- + ldoptlibs -ldbm
- + sharedlib off
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/uci.hp-pa Thu Dec 3 09:37:33 1992
- ***************
- *** 0 ****
- --- 1,64 ----
- + # uci.hp-pa - MH 6.8 options for HPUX (HPUX 8.05 on HP9000/720).
- + # based on a file from Bill Wohler <wohler@sap-ag.de>
- + # Sat, 31 Oct 92 19:16:29 +0100
- + #
- + #
- + # Installation Paths
- + #
- + bin /usr/local/mh-6.8
- + etc /usr/local/lib/mh-6.8
- + popdir /usr/local/lib/mh-6.8
- + mandir /usr/man/mh
- + manuals standard
- + chown /bin/chown
- + #ln ln -s
- + #
- + # Compiler/loader
- + #
- + ccoptions +DA1.0 +DS1.0
- + curses -lcurses -ltermlib
- + ldoptions -s
- + #
- + # Message Transport System
- + #
- + mts mmdf2/smtp
- + #
- + # UCI BBoards Facility
- + #
- + #bboards nntp
- + bboards off
- + bbdelivery off
- + #
- + # Post Office Protocol
- + #
- + pop on
- + #
- + # General System Dependencies
- + #
- + signal void
- + sprintf int
- +
- + options BIND
- + options DBMPWD
- + options FCNTL
- + options MORE='"/usr/bin/more"'
- + options RENAME
- + options SOCKETS
- + options SYS5
- + options SYS5DIR
- + options UNISTD
- + options VSPRINTF
- + options _CLASSIC_ANSI_TYPES
- +
- + #
- + # Site Preferences
- + #
- + options FOLDPROT='"0700"'
- + options MHE
- + options MHRC
- + options MIME
- + options MSGPROT='"0600"'
- + options OVERHEAD
- + options RPOP
- + options UCI
- + options WHATNOW
- *** ../mh-6.7.2/conf/examples/uci.sequent Thu Jan 30 13:05:24 1992
- --- conf/examples/uci.sequent Mon Dec 14 13:30:09 1992
- ***************
- *** 1,5 ****
- ! # uci.sun - for a Sequent running Dynix 3.0.17
- ! bin /usr/local/mh-6.7.2
- bbhome /usr/bboards
- - etc /usr/local/lib/mh-6.7.2
- mail /usr/spool/mail
- --- 1,11 ----
- ! # uci.sequent - MH 6.8 - Sequent running Dynix 3.1
- ! #
- ! bin /usr/bs/mh-6.8/bin
- ! etc /usr/bs/mh-6.8/lib
- ! #mandir /usr/man
- ! mandir /usr/bs/mh-6.8/man
- ! #popdir /usr/etc
- ! popdir /usr/bs/mh-6.8/lib
- ! #slibdir /usr/bs/mh-6.8/lib
- bbhome /usr/bboards
- mail /usr/spool/mail
- ***************
- *** 6,9 ****
- mailgroup off
- ! mandir /usr/man
- ! manuals local
- chown /etc/chown
- --- 12,14 ----
- mailgroup off
- ! manuals standard
- chown /etc/chown
- ***************
- *** 10,12 ****
- editor prompter
- ! remove mv -f
- mts mmdf2/smtp
- --- 15,17 ----
- editor prompter
- ! remove rm -f
- mts mmdf2/smtp
- ***************
- *** 13,15 ****
- bboards nntp
- ! bbdelivery on
- mf off
- --- 18,21 ----
- bboards nntp
- ! #bbdelivery on
- ! bbdelivery off
- mf off
- ***************
- *** 19,21 ****
- options BSD43
- - #options DBM
- #options LOCKF
- --- 25,26 ----
- ***************
- *** 23,33 ****
- options MHRC
- - #options NFS
- - options POP2
- options RPATHS
- - options RPOP
- - #options SUN40
- - #options TYPESIG=void
- options WHATNOW
- options UCI
- #options ZONEINFO
- cc atscc
- --- 28,48 ----
- options MHRC
- options RPATHS
- options WHATNOW
- + options MIME
- options UCI
- + options POP2
- + options RPOP
- + #options APOP
- + curses -lcurses -ltermcap
- + ranlib on
- + # Sequent specicis
- + #options TYPESIG=int
- + signal int
- + #options DBMPWD
- + #options NFS
- + #options SUN40
- + #options ATTVIBUG
- + #options MPOP
- #options ZONEINFO
- + #
- cc atscc
- ***************
- *** 34,38 ****
- ldoptions -s
- ! ldoptlibs -ldbm -lseq
- ! curses -lcurses -ltermcap
- ! ranlib on
- sharedlib off
- --- 49,51 ----
- ldoptions -s
- ! ldoptlibs -lseq
- sharedlib off
- *** ../mh-6.7.2/conf/examples/uci.sun Tue Jan 28 15:07:56 1992
- --- conf/examples/uci.sun Mon Dec 14 10:23:32 1992
- ***************
- *** 1,5 ****
- ! # uci.sun - for a Sun3 or Sun4 running Sun OS 4.1
- ! bin /usr/local/mh-6.7.2
- ! bbhome /usr/bboards
- ! etc /usr/local/lib/mh-6.7.2
- mail /usr/spool/mail
- --- 1,9 ----
- ! # uci.sun - MH 6.8 - Sun3 or Sun4 running Sun OS 4.1
- ! #
- ! bin /usr/bs/mh-6.8/bin
- ! etc /usr/bs/mh-6.8/lib
- ! popdir /usr/bs/mh-6.8/lib
- ! mandir /usr/bs/mh-6.8/man
- ! slibdir /usr/bs/mh-6.8/lib
- ! bbhome /usr/bs/mh-6.8/bboards
- mail /usr/spool/mail
- ***************
- *** 6,10 ****
- mailgroup off
- ! mandir /usr/man
- ! #manuals local
- ! manuals gen
- chown /etc/chown
- --- 10,12 ----
- mailgroup off
- ! manuals standard
- chown /etc/chown
- ***************
- *** 11,13 ****
- editor prompter
- ! remove mv -f
- mts mmdf2/smtp
- --- 13,15 ----
- editor prompter
- ! remove rm -f
- mts mmdf2/smtp
- ***************
- *** 20,22 ****
- options BSD43
- - options DBM
- #options LOCKF
- --- 22,23 ----
- ***************
- *** 24,44 ****
- options MHRC
- - options NFS
- - options POP2
- options RPATHS
- options RPOP
- options SUN40
- - options SUN41
- - options SUNVIBUG
- options ATTVIBUG
- ! options TYPESIG=void
- ! options WHATNOW
- ! options UCI
- #options ZONEINFO
- ! # for Sun4s
- cc /usr/bs/sunc/cc
- ! ldoptions -s
- ldoptlibs -ldbm
- ! curses -lcurses -ltermcap
- ! ranlib on
- ! sharedlib on
- ! slibdir /usr/local/lib
- --- 25,49 ----
- options MHRC
- options RPATHS
- + options WHATNOW
- + options MIME
- + options UCI
- + options POP2
- options RPOP
- + #options APOP
- + curses -lcurses -ltermcap
- + ranlib on
- + # Sun specifics
- + #options TYPESIG=void
- + signal void
- + options DBMPWD
- + options NFS
- options SUN40
- options ATTVIBUG
- ! #options MPOP
- #options ZONEINFO
- ! #
- cc /usr/bs/sunc/cc
- ! #cc /usr/gnu/bin/gcc
- ! ldoptions -s -L/usr/bs/mh-6.8/lib
- ldoptlibs -ldbm
- ! sharedlib sun4
- *** ../mh-6.7.2/conf/examples/uci.sun.debug Tue Feb 12 15:57:14 1991
- --- conf/examples/uci.sun.debug Thu Dec 3 09:35:05 1992
- ***************
- *** 1,5 ****
- ! # uci.sun - for a Sun3 or Sun4 running Sun OS 4.1
- ! bin /usr/local
- ! bbhome /usr/bboards
- ! etc /usr/local/lib/mh
- mail /usr/spool/mail
- --- 1,9 ----
- ! # uci.sun.debug - MH 6.8 - Sun3 or Sun4 running Sun OS 4.1
- ! #
- ! bin /usr/bs/mh-6.8/bin
- ! etc /usr/bs/mh-6.8/lib
- ! popdir /usr/bs/mh-6.8/lib
- ! mandir /usr/bs/mh-6.8/man
- ! slibdir /usr/bs/mh-6.8/lib
- ! bbhome /usr/bs/mh-6.8/bboards
- mail /usr/spool/mail
- ***************
- *** 6,9 ****
- mailgroup off
- ! mandir /usr/man
- ! manuals local
- chown /etc/chown
- --- 10,12 ----
- mailgroup off
- ! manuals standard
- chown /etc/chown
- ***************
- *** 10,12 ****
- editor prompter
- ! remove mv -f
- mts mmdf2/smtp
- --- 13,15 ----
- editor prompter
- ! remove rm -f
- mts mmdf2/smtp
- ***************
- *** 19,22 ****
- options BSD43
- ! options DBM
- ! options LOCKF
- options MHE
- --- 22,24 ----
- options BSD43
- ! #options LOCKF
- options MHE
- ***************
- *** 23,41 ****
- options MHRC
- - options NFS
- - options POP2
- options RPATHS
- - options RPOP
- - options SUN40
- - options SUNVIBUG
- - options TYPESIG=void
- options WHATNOW
- options UCI
- #options ZONEINFO
- ccoptions -g
- - #ldoptions -s
- ldoptlibs -ldbm
- ! curses -lcurses -ltermcap
- ! ranlib on
- ! #sharedlib on
- ! sharedlib off
- ! slibdir /usr/local/lib
- --- 25,51 ----
- options MHRC
- options RPATHS
- options WHATNOW
- + options MIME
- options UCI
- + options POP2
- + options RPOP
- + #options APOP
- + curses -lcurses -ltermcap
- + ranlib on
- + # Sun specifics
- + #options TYPESIG=void
- + signal void
- + options DBMPWD
- + options NFS
- + options SUN40
- + options ATTVIBUG
- + #options MPOP
- #options ZONEINFO
- + #
- + cc /usr/bs/sunc/cc
- + #cc /usr/gnu/bin/gcc
- + #ldoptions -s -L/usr/bs/mh-6.8/lib
- + ldoptions -g
- ccoptions -g
- ldoptlibs -ldbm
- ! #sharedlib sun4
- *** ../mh-6.7.2/conf/examples/udel Fri Apr 6 09:25:06 1990
- --- conf/examples/udel Thu Dec 3 09:39:41 1992
- ***************
- *** 1 ****
- --- 1,2 ----
- + # udel - UDel template
- bin /usr/uci
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/examples/ultrix.sap-ag.de Thu Dec 3 09:35:27 1992
- ***************
- *** 0 ****
- --- 1,24 ----
- + # ultrix.sap-ag.de - MH 6.8 options for ULTRIX (ULTRIX 4.2 on RISC).
- + # Bill Wohler <wohler@sap-ag.de>
- + # Sat, 31 Oct 92 19:14:43 +0100
- + #
- + # General
- + #
- + bin /usr/local/bin/mh
- + ldoptions -s
- + mandir /usr/local/man
- + manuals standard
- + mts sendmail/smtp
- + options BIND DBMPWD ISI MHE MHRC OVERHEAD RPATHS WHATNOW UK
- + #
- + # Machine specific options
- + #
- + options TYPESIG=void BSD42 BSD43
- + curses -lcurses -ltermlib
- + #
- + #
- + # the compiler complains:
- + # formatsbr.c:
- + # uopt: Warning: fmtscan: this procedure not optimized because it
- + # exceeds size threshold; to optimize this procedure, use -Olimit option
- + # with value >= 679.
- *** ../mh-6.7.2/conf/makefiles/MH-Makefile Sun Apr 8 19:55:57 1990
- --- conf/makefiles/MH-Makefile Thu Dec 3 08:23:48 1992
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: MH-Makefile,v 2.5 90/04/08 14:09:51 sources Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: MH-Makefile,v 2.15 1992/12/03 16:23:40 jromine Exp $
- ##############################################################################
- ***************
- *** 20,23 ****
- #
- ! # install: install system and clean up afterwards
- #
- # inst-lib: install shared libraries
- --- 20,25 ----
- #
- ! # install: install system
- #
- + # inst-all: install system
- + #
- # inst-lib: install shared libraries
- ***************
- *** 24,26 ****
- #
- ! # inst-all: install system
- #
- --- 26,28 ----
- #
- ! # mkdirs: make MH target directories
- #
- ***************
- *** 61,62 ****
- --- 63,66 ----
- INSTALL = zotnet support uip doc
- + BINDIR = $(DESTDIR)@(MHBINPATH)
- + ETCDIR = $(DESTDIR)@(MHETCPATH)
- SLIB = sbr
- ***************
- *** 63,67 ****
-
- ! install: inst-all clean
-
- ! inst-all: inst-lib
- for d in $(INSTALL); do (cd $$d; $(MAKE) inst-all); done
- --- 67,71 ----
-
- ! install: inst-all
-
- ! inst-all: mkdirs inst-lib
- for d in $(INSTALL); do (cd $$d; $(MAKE) inst-all); done
- ***************
- *** 70,71 ****
- --- 74,81 ----
-
- + mkdirs: $(BINDIR) $(ETCDIR)
- +
- + $(BINDIR) $(ETCDIR):
- + mkdir $@
- + chmod 0755 $@
- +
- tar:; @for d in $(INSTALL); \
- ***************
- *** 82,84 ****
-
- ! distribution:; rm -f _* :*
- @if test -f tma/mh/files; \
- --- 92,95 ----
-
- ! distribution: READ-ME CHANGES
- ! rm -f _* :*
- @if test -f tma/mh/files; \
- ***************
- *** 88,89 ****
- --- 99,108 ----
- fi
- + -rm -f support/pop/mmdfII/pop/lock.c
- + -rm -f support/bboards/mmdfII/bboards/lock.c
- + -rm -f zotnet/tws/tws.h
- + -rm -f uip/pshsbr.c
- + cd support/pop/mmdfII/pop ; @(LN) ../../../../zotnet/mts/lock.c .
- + cd support/bboards/mmdfII/bboards ; @(LN) ../../../../zotnet/mts/lock.c .
- + cd zotnet/tws ; @(LN) ../tws.h .
- + cd uip ; @(LN) popsbr.c pshsbr.c
- for d in $(DISTRIBUTION); \
- ***************
- *** 91,96 ****
-
- ! unconfig:; rm -f _* :* core
- for d in $(DISTRIBUTION); do (cd $$d; $(MAKE) unconfig); done
- ! echo > tmp \
- ! 'all:; @echo "You must configure MH first -- see READ-ME for details"'
- mv tmp Makefile
- --- 110,126 ----
-
- ! READ-ME: conf/mh-gen.8
- ! nroff -man conf/mh-gen.8 > read-me.tmp
- ! mv read-me.tmp $@
- !
- ! CHANGES: papers/changes/mh-changes.ms
- ! nroff -ms papers/changes/mh-changes.ms > changes.tmp
- ! mv changes.tmp $@
- !
- ! unconfig:; rm -f _* :* core READ-ME
- ! -rm -f support/pop/mmdfII/pop/lock.c
- ! -rm -f support/bboards/mmdfII/bboards/lock.c
- ! -rm -f zotnet/tws/tws.h
- ! -rm -f uip/pshsbr.c
- for d in $(DISTRIBUTION); do (cd $$d; $(MAKE) unconfig); done
- ! cp conf/makefiles/MH-Unconfig tmp
- mv tmp Makefile
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/makefiles/MH-Unconfig Thu Dec 3 08:23:48 1992
- ***************
- *** 0 ****
- --- 1,20 ----
- + all clean:; @echo "You must configure MH first -- see READ-ME for details"
- +
- + distribution unconfig: links READ-ME CHANGES
- +
- + READ-ME: conf/mh-gen.8
- + nroff -man conf/mh-gen.8 > read-me.tmp
- + mv read-me.tmp $@
- +
- + CHANGES: papers/changes/mh-changes.ms
- + nroff -ms papers/changes/mh-changes.ms > changes.tmp
- + mv changes.tmp $@
- +
- + links:; -rm -f support/pop/mmdfII/pop/lock.c
- + -rm -f support/bboards/mmdfII/bboards/lock.c
- + -rm -f zotnet/tws/tws.h
- + -rm -f uip/pshsbr.c
- + ln zotnet/mts/lock.c support/pop/mmdfII/pop/lock.c
- + ln zotnet/mts/lock.c support/bboards/mmdfII/bboards/lock.c
- + ln zotnet/tws.h zotnet/tws/tws.h
- + ln uip/popsbr.c uip/pshsbr.c
- *** ../mh-6.7.2/conf/makefiles/config Sun Apr 8 22:00:30 1990
- --- conf/makefiles/config Wed Feb 5 13:53:13 1992
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: config,v 2.7 90/04/08 22:00:29 sources Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: config,v 2.8 1992/02/05 21:52:46 jromine Exp $
- ##############################################################################
- ***************
- *** 36,38 ****
- version version.c: true
- ! @/bin/sh version.sh @(MHRELEASE)
-
- --- 36,38 ----
- version version.c: true
- ! @/bin/sh version.sh @(MHHOSTVER) @(MHRELEASE)
-
- *** ../mh-6.7.2/conf/makefiles/dist Sun Apr 8 20:01:29 1990
- --- conf/makefiles/dist Wed Dec 2 14:21:48 1992
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: dist,v 2.6 90/04/08 20:01:28 sources Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: dist,v 2.7 1992/12/02 22:21:43 jromine Exp $
- ##############################################################################
- ***************
- *** 27,29 ****
- TARGETS = ../READ-ME \
- ! mh-gen.cat MH.cat ADMIN.cat mh6.7.cat \
- bboards.dvi beginners.dvi mh4mm.dvi mh6.dvi multifarious.dvi \
- --- 27,29 ----
- TARGETS = ../READ-ME \
- ! mh-gen.cat MH.cat ADMIN.cat mh-changes.cat \
- bboards.dvi beginners.dvi mh4mm.dvi mh6.dvi multifarious.dvi \
- ***************
- *** 35,37 ****
-
- ! doc: MH.doc ADMIN.doc mh6.7.doc
-
- --- 35,37 ----
-
- ! doc: MH.doc ADMIN.doc mh-changes.doc
-
- ***************
- *** 38,40 ****
-
- ! IMPRESS = mh-gen.imp MH.imp ADMIN.imp mh6.7.imp \
- bboards.imp beginners.imp \
- --- 38,40 ----
-
- ! IMPRESS = mh-gen.imp MH.imp ADMIN.imp mh-changes.imp \
- bboards.imp beginners.imp \
- ***************
- *** 50,52 ****
- lpr -t -J ADMIN ADMIN.cat
- ! lpr -t -J MH.6.7 mh6.7.cat
- lpr -d -J BBoards bboards.dvi
- --- 50,52 ----
- lpr -t -J ADMIN ADMIN.cat
- ! lpr -t -J MH-CHANGES mh-changes.cat
- lpr -d -J BBoards bboards.dvi
- ***************
- *** 83,89 ****
-
- ! mh6.7.cat \
- ! mh6.7.doc \
- ! mh6.7.imp: true
- ! cd ../papers/mh6.7; make $@
- ! cp ../papers/mh6.7/$@ $@
-
- --- 83,89 ----
-
- ! mh-changes.cat \
- ! mh-changes.doc \
- ! mh-changes.imp: true
- ! cd ../papers/changes; make $@
- ! cp ../papers/changes/$@ $@
-
- *** ../mh-6.7.2/conf/makefiles/doc Wed Jan 29 15:33:36 1992
- --- conf/makefiles/doc Thu Oct 29 22:47:50 1992
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: doc,v 2.13 1992/01/29 23:33:31 jromine Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: doc,v 2.24 1992/10/28 17:01:04 jromine Exp $
- ##############################################################################
- ***************
- *** 9,11 ****
- ETCDIR = $(DESTDIR)@(MHETCPATH)
- ! MANDIR = @(MHMANDIR)
- DIR1 = @(MHMANDIR1)
- --- 9,11 ----
- ETCDIR = $(DESTDIR)@(MHETCPATH)
- ! MANDIR = $(DESTDIR)@(MHMANDIR)
- DIR1 = @(MHMANDIR1)
- ***************
- *** 34,37 ****
- mark.$(EXT1) mh-chart.$(EXT1) mh.$(EXT1) mhl.$(EXT1) \
- ! mhook.$(EXT1) mhmail.$(EXT1) mhpath.$(EXT1) msgchk.$(EXT1) \
- msh.$(EXT1) next.$(EXT1) packf.$(EXT1) pick.$(EXT1) \
- prev.$(EXT1) prompter.$(EXT1) rcvstore.$(EXT1) refile.$(EXT1) \
- --- 34,44 ----
- mark.$(EXT1) mh-chart.$(EXT1) mh.$(EXT1) mhl.$(EXT1) \
- ! mhook.$(EXT1) mhmail.$(EXT1) \
- ! @BEGIN: MIME
- ! mhn.$(EXT1) \
- ! @END: MIME
- ! mhparam.$(EXT1) mhpath.$(EXT1) msgchk.$(EXT1) \
- msh.$(EXT1) next.$(EXT1) packf.$(EXT1) pick.$(EXT1) \
- + @BEGIN: MPOP
- + popi.$(EXT1) \
- + @END: MPOP
- prev.$(EXT1) prompter.$(EXT1) rcvstore.$(EXT1) refile.$(EXT1) \
- ***************
- *** 38,40 ****
- repl.$(EXT1) rmf.$(EXT1) rmm.$(EXT1) scan.$(EXT1) \
- ! send.$(EXT1) show.$(EXT1) sortm.$(EXT1) vmh.$(EXT1) \
- whatnow.$(EXT1) whom.$(EXT1) $(OPTIONS1) $(OPTIONS2)
- --- 45,48 ----
- repl.$(EXT1) rmf.$(EXT1) rmm.$(EXT1) scan.$(EXT1) \
- ! send.$(EXT1) show.$(EXT1) slocal.$(EXT1) \
- ! sortm.$(EXT1) vmh.$(EXT1) \
- whatnow.$(EXT1) whom.$(EXT1) $(OPTIONS1) $(OPTIONS2)
- ***************
- *** 41,44 ****
- man1 = ali anno burst comp dist folder forw inc mark mh-chart mh mhl \
- ! mhook mhmail mhpath msgchk msh next packf pick prev prompter \
- ! rcvstore refile repl rmf rmm scan send show sortm vmh whatnow \
- whom $(options1) $(options2)
- --- 49,61 ----
- man1 = ali anno burst comp dist folder forw inc mark mh-chart mh mhl \
- ! mhook mhmail \
- ! @BEGIN: MIME
- ! mhn \
- ! @END: MIME
- ! mhparam mhpath msgchk msh next packf pick \
- ! @BEGIN: MPOP
- ! popi \
- ! @END: MPOP
- ! prev prompter \
- ! rcvstore refile repl rmf rmm scan send show slocal \
- ! sortm vmh whatnow \
- whom $(options1) $(options2)
- ***************
- *** 46,51 ****
- inst-forw inst-inc inst-mark inst-mh-chart inst-mh inst-mhl \
- ! inst-mhook inst-mhmail inst-mhpath inst-msgchk inst-msh \
- ! inst-next inst-packf inst-pick inst-prev inst-prompter \
- inst-rcvstore inst-refile inst-repl inst-rmf inst-rmm \
- ! inst-scan inst-send inst-show inst-sortm inst-vmh \
- inst-whatnow inst-whom $(inst-options1) $(inst-options2)
- --- 63,76 ----
- inst-forw inst-inc inst-mark inst-mh-chart inst-mh inst-mhl \
- ! inst-mhook inst-mhmail \
- ! @BEGIN: MIME
- ! inst-mhn \
- ! @END: MIME
- ! inst-mhparam inst-mhpath inst-msgchk inst-msh \
- ! inst-next inst-packf inst-pick \
- ! @BEGIN: MPOP
- ! inst-popi \
- ! @END: MPOP
- ! inst-prev inst-prompter \
- inst-rcvstore inst-refile inst-repl inst-rmf inst-rmm \
- ! inst-scan inst-send inst-show inst-slocal inst-sortm inst-vmh \
- inst-whatnow inst-whom $(inst-options1) $(inst-options2)
- ***************
- *** 53,58 ****
- forw.man inc.man mark.man mh-chart.man mh.man mhl.man \
- ! mhook.man mhmail.man mhpath.man msgchk.man msh.man next.man \
- ! packf.man pick.man prev.man prompter.man rcvstore.man \
- refile.man repl.man rmf.man rmm.man scan.man send.man \
- ! show.man sortm.man vmh.man whatnow.man whom.man $(Toptions1) \
- $(Toptions2)
- --- 78,91 ----
- forw.man inc.man mark.man mh-chart.man mh.man mhl.man \
- ! mhook.man mhmail.man \
- ! @BEGIN: MIME
- ! mhn.man \
- ! @END: MIME
- ! mhparam.man mhpath.man msgchk.man msh.man next.man packf.man \
- ! @BEGIN: MPOP
- ! popi.man \
- ! @END: MPOP
- ! pick.man prev.man prompter.man rcvstore.man \
- refile.man repl.man rmf.man rmm.man scan.man send.man \
- ! show.man slocal.man \
- ! sortm.man vmh.man whatnow.man whom.man $(Toptions1) \
- $(Toptions2)
- ***************
- *** 60,67 ****
- MAN5 = mh-alias.$(EXT5) mh-format.$(EXT5) mh-mail.$(EXT5) \
- ! mh-profile.$(EXT5) mh-sequence.$(EXT5)
- ! man5 = mh-alias mh-format mh-mail mh-profile mh-sequence
- inst-man5= inst-mh-alias inst-mh-format inst-mh-mail inst-mh-profile \
- ! inst-mh-sequence
- Tman5 = mh-alias.man mh-format.man mh-mail.man mh-profile.man \
- ! mh-sequence.man
-
- --- 93,100 ----
- MAN5 = mh-alias.$(EXT5) mh-format.$(EXT5) mh-mail.$(EXT5) \
- ! mh-profile.$(EXT5) mh-sequence.$(EXT5) mh-tailor.$(EXT5)
- ! man5 = mh-alias mh-format mh-mail mh-profile mh-sequence mh-tailor
- inst-man5= inst-mh-alias inst-mh-format inst-mh-mail inst-mh-profile \
- ! inst-mh-sequence inst-mh-tailor
- Tman5 = mh-alias.man mh-format.man mh-mail.man mh-profile.man \
- ! mh-sequence.man mh-tailor.man
-
- ***************
- *** 68,75 ****
- MAN8 = ap.$(EXT8) conflict.$(EXT8) dp.$(EXT8) install-mh.$(EXT8) \
- ! post.$(EXT8) mh-tailor.$(EXT8) fmtdump.$(EXT8)
- ! man8 = ap conflict dp install-mh post mh-tailor fmtdump
- ! inst-man8= inst-ap inst-conflict inst-dp inst-install-mh inst-post \
- ! inst-mh-tailor inst-fmtdump
- ! Tman8 = ap.man conflict.man dp.man install-mh.man post.man \
- ! mh-tailor.man fmtdump.man
-
- --- 101,123 ----
- MAN8 = ap.$(EXT8) conflict.$(EXT8) dp.$(EXT8) install-mh.$(EXT8) \
- ! @BEGIN: APOP
- ! popauth.$(EXT8) \
- ! @END: APOP
- ! post.$(EXT8) fmtdump.$(EXT8)
- ! man8 = ap conflict dp install-mh \
- ! @BEGIN: APOP
- ! popauth \
- ! @END: APOP
- ! post fmtdump
- ! inst-man8= inst-ap inst-conflict inst-dp inst-install-mh \
- ! @BEGIN: APOP
- ! inst-popauth \
- ! @END: APOP
- ! inst-post \
- ! inst-fmtdump
- ! Tman8 = ap.man conflict.man dp.man install-mh.man \
- ! @BEGIN: APOP
- ! popauth.man \
- ! @END: APOP
- ! post.man \
- ! fmtdump.man
-
- ***************
- *** 117,129 ****
-
- ! i-all: manual guide
-
- ! i-print: manual guide true
- ! lpr -t -J MH MH.cat
- ! lpr -t -J MH ADMIN.cat
-
- -
- - manual: MH.cat
- -
- - guide: ADMIN.cat
- -
- true:;
- --- 165,170 ----
-
- ! manual: MH.doc
-
- ! guide: ADMIN.doc
-
- true:;
- ***************
- *** 361,365 ****
-
- ! inst-mh-tailor: $(MANDIR)/$(DIR8)/mh-tailor.$(EXT8)
-
- ! $(MANDIR)/$(DIR8)/mh-tailor.$(EXT8): mh-tailor.man
- -$(REMOVE) $@ zmh-tailor.man
- --- 402,406 ----
-
- ! inst-mh-tailor: $(MANDIR)/$(DIR5)/mh-tailor.$(EXT5)
-
- ! $(MANDIR)/$(DIR5)/mh-tailor.$(EXT5): mh-tailor.man
- -$(REMOVE) $@ zmh-tailor.man
- ***************
- *** 424,425 ****
- --- 465,484 ----
-
- + inst-mhn: $(MANDIR)/$(DIR1)/mhn.$(EXT1)
- +
- + $(MANDIR)/$(DIR1)/mhn.$(EXT1): mhn.man
- + -$(REMOVE) $@ zmhn.man
- + cp mhn.man $@
- + -@chmod $(MANPROT) $@
- + -@ls -l $@
- + -@echo ""
- +
- + inst-mhparam: $(MANDIR)/$(DIR1)/mhparam.$(EXT1)
- +
- + $(MANDIR)/$(DIR1)/mhparam.$(EXT1): mhparam.man
- + -$(REMOVE) $@ zmhparam.man
- + cp mhparam.man $@
- + -@chmod $(MANPROT) $@
- + -@ls -l $@
- + -@echo ""
- +
- inst-mhpath: $(MANDIR)/$(DIR1)/mhpath.$(EXT1)
- ***************
- *** 469,470 ****
- --- 528,547 ----
-
- + inst-popauth: $(MANDIR)/$(DIR8)/popauth.$(EXT8)
- +
- + $(MANDIR)/$(DIR8)/popauth.$(EXT8): popauth.man
- + -$(REMOVE) $@ zpopauth.man
- + cp popauth.man $@
- + -@chmod $(MANPROT) $@
- + -@ls -l $@
- + -@echo ""
- +
- + inst-popi: $(MANDIR)/$(DIR1)/popi.$(EXT1)
- +
- + $(MANDIR)/$(DIR1)/popi.$(EXT1): popi.man
- + -$(REMOVE) $@ zpopi.man
- + cp popi.man $@
- + -@chmod $(MANPROT) $@
- + -@ls -l $@
- + -@echo ""
- +
- inst-pick: $(MANDIR)/$(DIR1)/pick.$(EXT1)
- ***************
- *** 577,578 ****
- --- 654,664 ----
-
- + inst-slocal: $(MANDIR)/$(DIR1)/slocal.$(EXT1)
- +
- + $(MANDIR)/$(DIR1)/slocal.$(EXT1): slocal.man
- + -$(REMOVE) $@ zslocal.man
- + cp slocal.man $@
- + -@chmod $(MANPROT) $@
- + -@ls -l $@
- + -@echo ""
- +
- inst-sortm: $(MANDIR)/$(DIR1)/sortm.$(EXT1)
- ***************
- *** 658,660 ****
- --- 744,748 ----
- mhmail: mhmail.man
- + mhparam: mhparam.man
- mhpath: mhpath.man
- + mhn: mhn.man
- msgchk: msgchk.man
- ***************
- *** 664,665 ****
- --- 752,755 ----
- pick: pick.man
- + popauth: popauth.man
- + popi: popi.man
- post: post.man
- ***************
- *** 675,676 ****
- --- 765,767 ----
- show: show.man
- + slocal: slocal.man
- sortm: sortm.man
- ***************
- *** 683,690 ****
- dist.me folder.me forw.me inc.me mark.me mh-chart.me mh.me \
- ! mhl.me mhmail.me mhook.me mhpath.me msgchk.me msh.me next.me \
- ! packf.me pick.me prev.me prompter.me rcvstore.me refile.me \
- ! repl.me rmf.me rmm.me scan.me send.me show.me sortm.me vmh.me \
- ! whatnow.me whom.me mh-alias.me mh-format.me mh-mail.me \
- ! mh-profile.me mh-sequence.me \
- ! ap.me conflict.me dp.me install-mh.me fmtdump.me post.me \
- @BEGIN: TMA
- --- 774,791 ----
- dist.me folder.me forw.me inc.me mark.me mh-chart.me mh.me \
- ! mhl.me mhmail.me \
- ! @BEGIN: MIME
- ! mhn.me \
- ! @END: MIME
- ! mhook.me mhparam.me mhpath.me msgchk.me msh.me \
- ! next.me packf.me pick.me \
- ! @BEGIN: MPOP
- ! popi.me \
- ! @END: MPOP
- ! prev.me prompter.me \
- ! rcvstore.me refile.me repl.me rmf.me rmm.me scan.me send.me \
- ! show.me slocal.me \
- ! sortm.me vmh.me whatnow.me whom.me mh-alias.me \
- ! mh-format.me mh-mail.me mh-profile.me mh-sequence.me \
- ! ap.me conflict.me dp.me install-mh.me fmtdump.me \
- ! post.me \
- @BEGIN: TMA
- ***************
- *** 697,699 ****
- bboards5.me bbaka.me bbexp.me bboards8.me bbtar.me \
- ! pop5.me pop8.me popaka.me popd.me popwrd.me \
- mf.me rmail.me \
- --- 798,804 ----
- bboards5.me bbaka.me bbexp.me bboards8.me bbtar.me \
- ! pop5.me pop8.me popaka.me \
- ! @BEGIN: APOP
- ! popauth.me \
- ! @END: APOP
- ! popd.me popwrd.me \
- mf.me rmail.me \
- *** ../mh-6.7.2/conf/makefiles/mts/mh Thu Apr 5 16:05:10 1990
- --- conf/makefiles/mts/mh Fri Nov 20 09:14:18 1992
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: mh,v 1.6 90/04/05 15:15:55 sources Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: mh,v 1.10 1992/11/20 17:14:07 jromine Exp $
- ##############################################################################
- ***************
- *** 20,21 ****
- --- 20,23 ----
- LLIBS =
- + CP = @(CP)
- + LN = @(LN)
-
- ***************
- *** 59,63 ****
- -rm -f ../libmts.a
- ! ln $@ ../libmts.a
- -rm -f ../llib-lmts
- ! -ln llib-lmhmts ../llib-lmts
- -@ls -l $@
- --- 61,65 ----
- -rm -f ../libmts.a
- ! -cd ..; $(LN) mh/$@ libmts.a
- -rm -f ../llib-lmts
- ! -cd .. ; $(LN) mh/llib-lmhmts llib-lmts
- -@ls -l $@
- *** ../mh-6.7.2/conf/makefiles/mts/mmdf Thu Apr 5 16:05:11 1990
- --- conf/makefiles/mts/mmdf Fri Nov 20 09:14:17 1992
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: mmdf,v 1.6 90/04/05 15:16:01 sources Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: mmdf,v 1.10 1992/11/20 17:14:07 jromine Exp $
- ##############################################################################
- ***************
- *** 20,21 ****
- --- 20,23 ----
- LLIBS =
- + CP = @(CP)
- + LN = @(LN)
-
- ***************
- *** 68,72 ****
- -rm -f ../libmts.a
- ! ln $@ ../libmts.a
- -rm -f ../llib-lmts
- ! -ln llib-lmmdf ../llib-lmts
- -@ls -l $@
- --- 70,74 ----
- -rm -f ../libmts.a
- ! -cd ..; $(LN) mmdf/$@ libmts.a
- -rm -f ../llib-lmts
- ! -cd .. ; $(LN) mmdf/llib-lmmdf llib-lmts
- -@ls -l $@
- ***************
- *** 90,94 ****
- -rm -f ../libmts.a
- ! ln $@ ../libmts.a
- -rm -f ../llib-lmts
- ! -ln llib-lmmdf ../llib-lmts
- -@ls -l $@
- --- 92,96 ----
- -rm -f ../libmts.a
- ! -cd ..; $(LN) mmdf/$@ libmts.a
- -rm -f ../llib-lmts
- ! -cd ..; $(LN) mmdf/llib-lmmdf llib-lmts
- -@ls -l $@
- *** ../mh-6.7.2/conf/makefiles/mts/sendmail Thu Apr 5 16:05:10 1990
- --- conf/makefiles/mts/sendmail Fri Nov 20 09:14:16 1992
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: sendmail,v 1.6 90/04/05 15:15:48 sources Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: sendmail,v 1.10 1992/11/20 17:14:07 jromine Exp $
- ##############################################################################
- ***************
- *** 18,19 ****
- --- 18,21 ----
- LFLAGS = -bhu $(OPTIONS)
- + CP = @(CP)
- + LN = @(LN)
-
- ***************
- *** 58,62 ****
- -rm -f ../libmts.a
- ! ln $@ ../libmts.a
- -rm -f ../llib-lmts
- ! -ln llib-lsendmail ../llib-lmts
- -@ls -l $@
- --- 60,64 ----
- -rm -f ../libmts.a
- ! -cd ..; $(LN) sendmail/$@ libmts.a
- -rm -f ../llib-lmts
- ! -cd .. ; $(LN) sendmail/llib-lsendmail llib-lmts
- -@ls -l $@
- *** ../mh-6.7.2/conf/makefiles/papers Thu Apr 5 16:05:20 1990
- --- conf/makefiles/papers Wed Dec 2 13:57:38 1992
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: papers,v 2.5 90/04/05 15:18:04 sources Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: papers,v 2.6 1992/12/02 21:57:34 jromine Exp $
- ##############################################################################
- ***************
- *** 10,12 ****
-
- ! DIRS = bboards beginners mh4 mh4mm mh5 mh6.5 mh6.7 \
- multifarious mznet realwork trusted tutorial
- --- 10,12 ----
-
- ! DIRS = bboards beginners changes mh4 mh4mm mh5 mh6.5 \
- multifarious mznet realwork trusted tutorial
- *** ../mh-6.7.2/conf/makefiles/sbr Thu Jan 30 08:36:20 1992
- --- conf/makefiles/sbr Wed Nov 18 08:52:40 1992
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: sbr,v 2.12 1992/01/30 16:36:16 jromine Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: sbr,v 2.19 1992/11/12 22:47:24 jromine Exp $
- ##############################################################################
- ***************
- *** 25,27 ****
- @BEGIN: SHAREDLIB
- ! LIBS = shared libmh.a libmh.so libmh.sa
- SLIBVER = @(SLIBVER)
- --- 25,30 ----
- @BEGIN: SHAREDLIB
- ! @BEGIN: SUN4SHLIB
- ! LIBSA = libmh.sa
- ! @END: SUN4SHLIB
- ! LIBS = shared libmh.a libmh.so $(LIBSA)
- SLIBVER = @(SLIBVER)
- ***************
- *** 28,29 ****
- --- 31,33 ----
- SLIBDIR = @(SLIBDIR)
- + SLFLAGS= @(SLFLAGS)
- @END: SHAREDLIB
- ***************
- *** 42,44 ****
- m_setseq.c m_setvis.c m_sync.c m_tmpfil.c m_update.c \
- ! m_whatnow.c makedir.c path.c peekc.c pidwait.c pidstatus.c \
- printsw.c push.c putenv.c pwd.c refile.c remdir.c r1bindex.c \
- --- 46,48 ----
- m_setseq.c m_setvis.c m_sync.c m_tmpfil.c m_update.c \
- ! makedir.c path.c peekc.c pidwait.c pidstatus.c \
- printsw.c push.c putenv.c pwd.c refile.c remdir.c r1bindex.c \
- ***************
- *** 58,60 ****
- m_setseq.o m_setvis.o m_sync.o m_tmpfil.o m_update.o \
- ! m_whatnow.o makedir.o path.o peekc.o pidwait.o pidstatus.o \
- printsw.o push.o putenv.o pwd.o refile.o remdir.o r1bindex.o \
- --- 62,64 ----
- m_setseq.o m_setvis.o m_sync.o m_tmpfil.o m_update.o \
- ! makedir.o path.o peekc.o pidwait.o pidstatus.o \
- printsw.o push.o putenv.o pwd.o refile.o remdir.o r1bindex.o \
- ***************
- *** 75,77 ****
- -rm -f $@ shared/$@
- ! $(CC) $(CFLAGS) -c -pic $*.c
- mv $@ shared/$@
- --- 79,81 ----
- -rm -f $@ shared/$@
- ! $(CC) $(CFLAGS) -c $(SLFLAGS) $*.c
- mv $@ shared/$@
- ***************
- *** 109,111 ****
- --- 113,120 ----
- -mv -f $@ z$@
- + @BEGIN: SUN4SHLIB
- (cd shared; ld -o ../$@ -assert pure-text $(OFILES))
- + @END: SUN4SHLIB
- + @BEGIN: SYS5SHLIB
- + (cd shared; ld -G -o ../$@ -h $@.$(SLIBVER) $(OFILES))
- + @END: SYS5SHLIB
- -@rm -f $@.$(SLIBVER)
- ***************
- *** 115,116 ****
- --- 124,126 ----
-
- + @BEGIN: SUN4SHLIB
- libmh.sa: $(ODEFS)
- ***************
- *** 127,128 ****
- --- 137,139 ----
- -@echo "MH data interface description built normally"
- + @END: SUN4SHLIB
-
- ***************
- *** 136,138 ****
- @BEGIN: SHAREDLIB
- ! inst-lib: libmh.so libmh.sa
- -rm -f $(SLIBDIR)/libmh.so.$(SLIBVER)
- --- 147,149 ----
- @BEGIN: SHAREDLIB
- ! inst-lib: libmh.so $(LIBSA)
- -rm -f $(SLIBDIR)/libmh.so.$(SLIBVER)
- ***************
- *** 143,144 ****
- --- 154,156 ----
- -@echo ""
- + @BEGIN: SUN4SHLIB
- -rm -f $(SLIBDIR)/libmh.sa.$(SLIBVER)
- ***************
- *** 146,147 ****
- --- 158,162 ----
- -@chmod $(PGMPROT) $(SLIBDIR)/libmh.sa.$(SLIBVER)
- + @BEGIN: RANLIB
- + cd $(SLIBDIR); ranlib libmh.sa.$(SLIBVER)
- + @END: RANLIB
- -@ls -l $(SLIBDIR)/libmh.sa.*
- ***************
- *** 149,150 ****
- --- 164,166 ----
- -@echo ""
- + @END: SUN4SHLIB
- @END: SHAREDLIB
- ***************
- *** 414,418 ****
- #m_update.o: /usr/include/signal.h
- - m_whatnow.o: m_whatnow.c
- - m_whatnow.o: ../h/mh.h
- - #m_whatnow.o: /usr/include/stdio.h
- makedir.o: makedir.c
- --- 430,431 ----
- *** ../mh-6.7.2/conf/makefiles/support/bboards Tue Dec 18 13:34:39 1990
- --- conf/makefiles/support/bboards Tue Nov 3 19:30:52 1992
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: bboards,v 2.9 90/12/18 13:34:38 mh Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: bboards,v 2.12 1992/11/04 03:30:31 jromine Exp $
- ##############################################################################
- ***************
- *** 41,45 ****
- LDFLAGS = $(LDOPTIONS)
- ! LIBES1 = ../../zotnet/libzot.a
- @BEGIN: STDLIB
- ! LIBES2 = ../../config/config.o ../../sbr/libmh.a $(LIBES1)
- LDLIBS1 = $(LIBES1) $(LDOPTLIB)
- --- 41,46 ----
- LDFLAGS = $(LDOPTIONS)
- ! LIBES1 = ../../zotnet/libzot.a ../../mts/libmts.a
- @BEGIN: STDLIB
- ! LIBES2 = ../../config/config.o ../../config/version.o \
- ! ../../sbr/libmh.a $(LIBES1)
- LDLIBS1 = $(LIBES1) $(LDOPTLIB)
- ***************
- *** 47,50 ****
- @END: STDLIB
- @BEGIN: SHAREDLIB
- ! LIBES2 = ../../config/config.o ../../sbr/libmh.so $(LIBES1)
- LDLIBS1 = $(LIBES1) $(LDOPTLIB)
- --- 48,55 ----
- @END: STDLIB
- + @BEGIN: SUN4SHLIB
- + SLIBVER = .@(SLIBVER)
- + @END: SUN4SHLIB
- @BEGIN: SHAREDLIB
- ! LIBES2 = ../../config/config.o ../../config/version.o \
- ! ../../sbr/libmh.so $(LIBES1)
- LDLIBS1 = $(LIBES1) $(LDOPTLIB)
- ***************
- *** 51,54 ****
- LDLIBS2 = $(LIBES2) $(LDOPTLIB)
- ! LDLIBS2 = ../../config/config.o -Bdynamic @(SLDFLAG) -lmh \
- ! $(LIBES1) $(LDOPTLIB)
- @END: SHAREDLIB
- --- 56,59 ----
- LDLIBS2 = $(LIBES2) $(LDOPTLIB)
- ! LDLIBS2 = ../../config/config.o ../../config/version.o \
- ! -Bdynamic @(SLDFLAG) -lmh$(SLIBVER) $(LIBES1) $(LDOPTLIB)
- @END: SHAREDLIB
- ***************
- *** 252,253 ****
- --- 257,259 ----
- unconfig: distribution
- + -rm -f mmdfII/bboards/lock.c
- -rm -f Makefile
- *** ../mh-6.7.2/conf/makefiles/support/general Thu Apr 5 16:05:13 1990
- --- conf/makefiles/support/general Fri Nov 20 20:00:41 1992
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: general,v 1.10 90/04/05 15:16:25 sources Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: general,v 1.18 1992/10/28 18:56:06 jromine Exp $
- ##############################################################################
- ***************
- *** 16,17 ****
- --- 16,22 ----
- @END: BBSERVER
- + @BEGIN: MIME
- + IOPTMIME= inst-mhndefs inst-viamail
- + UOPTMIME= mhn_defaults viamail
- + TOPTMIME= mhn_defaults viamail
- + @END: MIME
- REMOVE = @(MHREMOVE)
- ***************
- *** 18,19 ****
- --- 23,26 ----
- FILPROT = 0644
- + PGMPROT = 0755
- + CP = @(CP)
-
- ***************
- *** 21,23 ****
- rcvdistcomps replcomps mhl.digest mhl.format mhl.forward \
- ! mhl.body scan.mailx scan.size scan.time scan.timely $(TOPTMISC)
-
- --- 28,31 ----
- rcvdistcomps replcomps mhl.digest mhl.format mhl.forward \
- ! mhl.body mhl.headers scan.default scan.mailx scan.size \
- ! scan.time scan.timely packmbox $(TOPTMISC) $(TOPTMIME)
-
- ***************
- *** 38,41 ****
- inst-forwcomps inst-rcvdistcomps inst-replcomps inst-digest \
- ! inst-format inst-forward inst-body inst-mailx inst-size \
- ! inst-time inst-timely $(IOPTMISC)
-
- --- 46,50 ----
- inst-forwcomps inst-rcvdistcomps inst-replcomps inst-digest \
- ! inst-format inst-forward inst-body inst-headers inst-mailx \
- ! inst-default inst-size inst-time inst-timely \
- ! inst-packmbox $(IOPTMISC) $(IOPTMIME)
-
- ***************
- *** 51,54 ****
- rcvdistcomps replcomps mhl.digest mhl.format mhl.forward \
- ! mhl.body scan.mailx scan.size scan.time scan.timely \
- ! $(UOPTMISC)
-
- --- 60,64 ----
- rcvdistcomps replcomps mhl.digest mhl.format mhl.forward \
- ! mhl.body mhl.headers scan.default scan.mailx scan.size \
- ! scan.time scan.timely viamail packmbox \
- ! $(UOPTMISC) $(UOPTMIME)
-
- ***************
- *** 64,66 ****
- $(REMOVE) $@ zMailAliases; \
- ! cp MailAliases $@; \
- else \
- --- 74,76 ----
- $(REMOVE) $@ zMailAliases; \
- ! $(CP) MailAliases $@; \
- else \
- ***************
- *** 77,79 ****
- -$(REMOVE) $@ zcomponents
- ! cp components $@
- -@chmod $(FILPROT) $@
- --- 87,89 ----
- -$(REMOVE) $@ zcomponents
- ! $(CP) components $@
- -@chmod $(FILPROT) $@
- ***************
- *** 87,89 ****
- -$(REMOVE) $@ zdigestcomps
- ! cp digestcomps $@
- -@chmod $(FILPROT) $@
- --- 97,99 ----
- -$(REMOVE) $@ zdigestcomps
- ! $(CP) digestcomps $@
- -@chmod $(FILPROT) $@
- ***************
- *** 97,99 ****
- -$(REMOVE) $@ zdistcomps
- ! cp distcomps $@
- -@chmod $(FILPROT) $@
- --- 107,109 ----
- -$(REMOVE) $@ zdistcomps
- ! $(CP) distcomps $@
- -@chmod $(FILPROT) $@
- ***************
- *** 107,109 ****
- -$(REMOVE) $@ zforwcomps
- ! cp forwcomps $@
- -@chmod $(FILPROT) $@
- --- 117,119 ----
- -$(REMOVE) $@ zforwcomps
- ! $(CP) forwcomps $@
- -@chmod $(FILPROT) $@
- ***************
- *** 117,119 ****
- -$(REMOVE) $@ zrcvdistcomps
- ! cp rcvdistcomps $@
- -@chmod $(FILPROT) $@
- --- 127,129 ----
- -$(REMOVE) $@ zrcvdistcomps
- ! $(CP) rcvdistcomps $@
- -@chmod $(FILPROT) $@
- ***************
- *** 127,129 ****
- -$(REMOVE) $@ zreplcomps
- ! cp replcomps $@
- -@chmod $(FILPROT) $@
- --- 137,139 ----
- -$(REMOVE) $@ zreplcomps
- ! $(CP) replcomps $@
- -@chmod $(FILPROT) $@
- ***************
- *** 137,139 ****
- -$(REMOVE) $@ zmhl.digest
- ! cp mhl.digest $@
- -@chmod $(FILPROT) $@
- --- 147,149 ----
- -$(REMOVE) $@ zmhl.digest
- ! $(CP) mhl.digest $@
- -@chmod $(FILPROT) $@
- ***************
- *** 147,149 ****
- -$(REMOVE) $@ zmhl.format
- ! cp mhl.format $@
- -@chmod $(FILPROT) $@
- --- 157,159 ----
- -$(REMOVE) $@ zmhl.format
- ! $(CP) mhl.format $@
- -@chmod $(FILPROT) $@
- ***************
- *** 157,159 ****
- -$(REMOVE) $@ zmhl.forward
- ! cp mhl.forward $@
- -@chmod $(FILPROT) $@
- --- 167,169 ----
- -$(REMOVE) $@ zmhl.forward
- ! $(CP) mhl.forward $@
- -@chmod $(FILPROT) $@
- ***************
- *** 167,169 ****
- -$(REMOVE) $@ zmhl.body
- ! cp mhl.body $@
- -@chmod $(FILPROT) $@
- --- 177,179 ----
- -$(REMOVE) $@ zmhl.body
- ! $(CP) mhl.body $@
- -@chmod $(FILPROT) $@
- ***************
- *** 173,174 ****
- --- 183,203 ----
-
- + inst-headers: $(ETCDIR)/mhl.headers
- +
- + $(ETCDIR)/mhl.headers: mhl.headers
- + -$(REMOVE) $@ zmhl.headers
- + cp mhl.headers $@
- + -@chmod $(FILPROT) $@
- + -@ls -l $@
- + -@echo ""
- +
- +
- + inst-default: $(ETCDIR)/scan.default
- +
- + $(ETCDIR)/scan.default: scan.default
- + -$(REMOVE) $@ zscan.default
- + $(CP) scan.default $@
- + -@chmod $(FILPROT) $@
- + -@ls -l $@
- + -@echo ""
- +
- inst-mailx: $(ETCDIR)/scan.mailx
- ***************
- *** 177,179 ****
- -$(REMOVE) $@ zscan.mailx
- ! cp scan.mailx $@
- -@chmod $(FILPROT) $@
- --- 206,208 ----
- -$(REMOVE) $@ zscan.mailx
- ! $(CP) scan.mailx $@
- -@chmod $(FILPROT) $@
- ***************
- *** 187,189 ****
- -$(REMOVE) $@ zscan.size
- ! cp scan.size $@
- -@chmod $(FILPROT) $@
- --- 216,218 ----
- -$(REMOVE) $@ zscan.size
- ! $(CP) scan.size $@
- -@chmod $(FILPROT) $@
- ***************
- *** 197,199 ****
- -$(REMOVE) $@ zscan.time
- ! cp scan.time $@
- -@chmod $(FILPROT) $@
- --- 226,228 ----
- -$(REMOVE) $@ zscan.time
- ! $(CP) scan.time $@
- -@chmod $(FILPROT) $@
- ***************
- *** 207,209 ****
- -$(REMOVE) $@ zscan.timely
- ! cp scan.timely $@
- -@chmod $(FILPROT) $@
- --- 236,238 ----
- -$(REMOVE) $@ zscan.timely
- ! $(CP) scan.timely $@
- -@chmod $(FILPROT) $@
- ***************
- *** 213,214 ****
- --- 242,253 ----
-
- + inst-packmbox: $(ETCDIR)/packmbox
- +
- + $(ETCDIR)/packmbox: packmbox.sh
- + -$(REMOVE) $@ zpackmbox.sh
- + cp packmbox.sh $@
- + -@chmod $(PGMPROT) $@
- + -@ls -l $@
- + -@echo ""
- +
- +
- inst-bboards: $(ETCDIR)/BBoardAliases
- ***************
- *** 218,220 ****
- $(REMOVE) $@ zBBoardAliases; \
- ! cp BBoardAliases $@; \
- else \
- --- 257,259 ----
- $(REMOVE) $@ zBBoardAliases; \
- ! $(CP) BBoardAliases $@; \
- else \
- ***************
- *** 228,229 ****
- --- 267,291 ----
-
- + inst-viamail: $(ETCDIR)/viamail
- +
- + $(ETCDIR)/viamail: viamail.sh
- + -$(REMOVE) $@ zviamail.sh
- + cp viamail.sh $@
- + -@chmod $(PGMPROT) $@
- + -@ls -l $@
- + -@echo ""
- +
- +
- + inst-mhndefs: $(ETCDIR)/mhn_defaults
- +
- + $(ETCDIR)/mhn_defaults: true
- + -if [ ! -f $@ ]; then \
- + ./bootmhn.sh $(ETCDIR); \
- + else \
- + echo "Will not overwrite existing $@"; \
- + fi
- + -@chmod $(FILPROT) $@
- + -@ls -l $@
- + -@echo ""
- +
- +
- ##############################################################################
- ***************
- *** 242 ****
- --- 304,306 ----
- unclean:; -rm -f z* _* :* core MAKEGEN
- +
- + true:;
- *** ../mh-6.7.2/conf/makefiles/support/pop Tue Dec 18 13:34:38 1990
- --- conf/makefiles/support/pop Tue Nov 24 20:19:04 1992
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: pop,v 2.9 90/12/18 13:34:33 mh Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: pop,v 2.26 1992/11/25 04:18:59 jromine Exp $
- ##############################################################################
- ***************
- *** 9,11 ****
- BINDIR = $(DESTDIR)@(MHBINPATH)
- ! ETCDIR = /usr/etc
- LIBDIR = $(DESTDIR)@(MHETCPATH)
- --- 9,11 ----
- BINDIR = $(DESTDIR)@(MHBINPATH)
- ! ETCDIR = $(DESTDIR)@(MHPOPDPATH)
- LIBDIR = $(DESTDIR)@(MHETCPATH)
- ***************
- *** 14,15 ****
- --- 14,18 ----
- LDOPTLIB= @(LDOPTLIB)
- + @BEGIN: MPOP
- + LDCURSES= @(LDCURSES)
- + @END: MPOP
- PGMPROT = 0711
- ***************
- *** 18,24 ****
- POPUID = pop
- @BEGIN: POP
- ! ALL = popd popaka popwrd popsbr
- ! INST-ALL= inst-popd inst-popaka inst-popwrd
- ! LALL = l-popd l-popaka l-popwrd l-popsbr
- ! TALL = xpopd xpopaka xpopwrd
- @END: POP
- --- 21,33 ----
- POPUID = pop
- + @BEGIN: APOP
- + Apop = popauth
- + IApop = inst-popauth
- + Lpop = l-popauth
- + Tpop = xpopauth
- + @END: APOP
- @BEGIN: POP
- ! ALL = popd popaka $(Apop) popwrd
- ! INST-ALL= inst-popd inst-popaka $(IApop) inst-popwrd
- ! LALL = l-popd l-popaka $(Lpop) l-popwrd
- ! TALL = xpopd xpopaka $(Tpop) xpopwrd
- @END: POP
- ***************
- *** 25,26 ****
- --- 34,36 ----
-
- + CP = @(CP)
- CC = @(MHCOMPILER)
- ***************
- *** 39,41 ****
- LDFLAGS = $(LDOPTIONS)
- ! LIBES1 = ../../zotnet/libzot.a
- @BEGIN: STDLIB
- --- 49,51 ----
- LDFLAGS = $(LDOPTIONS)
- ! LIBES1 = ../../zotnet/libzot.a ../../mts/libmts.a
- @BEGIN: STDLIB
- ***************
- *** 45,46 ****
- --- 55,59 ----
- @END: STDLIB
- + @BEGIN: SUN4SHLIB
- + SLIBVER = .@(SLIBVER)
- + @END: SUN4SHLIB
- @BEGIN: SHAREDLIB
- ***************
- *** 49,51 ****
- LDLIBS2 = ../../config/config.o ../../config/version.o \
- ! -Bdynamic @(SLDFLAG) -lmh $(LIBES1) $(LDOPTLIB)
- @END: SHAREDLIB
- --- 62,64 ----
- LDLIBS2 = ../../config/config.o ../../config/version.o \
- ! -Bdynamic @(SLDFLAG) -lmh$(SLIBVER) $(LIBES1) $(LDOPTLIB)
- @END: SHAREDLIB
- ***************
- *** 57,58 ****
- --- 70,72 ----
-
- + .c:; echo $@
-
- ***************
- *** 81,82 ****
- --- 95,97 ----
- -cd $(LIBDIR); rm -f popaka popwrd
- + -cd $(BINDIR); rm -f popauth
-
- ***************
- *** 92,94 ****
- -rm -f $@
- ! cp xpopd $@
- -chmod 700 $@
- --- 107,109 ----
- -rm -f $@
- ! $(CP) xpopd $@
- -chmod 700 $@
- ***************
- *** 100,104 ****
- xpopd: popd.o popser.o syslog.o \
- ! ../../uip/dropsbr.o $(LIBES2)
- $(LD) $(LDFLAGS) -o $@ popd.o popser.o syslog.o \
- ! ../../uip/dropsbr.o $(LDLIBS2)
-
- --- 115,127 ----
- xpopd: popd.o popser.o syslog.o \
- ! ../../uip/dropsbr.o \
- ! @BEGIN: MPOP
- ! ../../uip/scansbr.o \
- ! @END: MPOP
- ! $(LIBES2)
- $(LD) $(LDFLAGS) -o $@ popd.o popser.o syslog.o \
- ! ../../uip/dropsbr.o \
- ! @BEGIN: MPOP
- ! ../../uip/scansbr.o \
- ! @END: MPOP
- ! $(LDLIBS2) $(LDCURSES)
-
- ***************
- *** 105,107 ****
- l-popd:; $(LINT) $(LFLAGS) popd.c popser.c \
- ! ../../uip/dropsbr.c $(LLIBS2)
-
- --- 128,134 ----
- l-popd:; $(LINT) $(LFLAGS) popd.c popser.c \
- ! ../../uip/dropsbr.c \
- ! @BEGIN: MPOP
- ! ../../uip/scansbr.c \
- ! @END: MPOP
- ! $(LLIBS2)
-
- ***************
- *** 116,118 ****
- -$(REMOVE) $@ zpopaka
- ! cp xpopaka $@
- -@chmod $(PGMPROT) $@
- --- 143,145 ----
- -$(REMOVE) $@ zpopaka
- ! $(CP) xpopaka $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 130,131 ****
- --- 157,181 ----
- ################################################################
- + # popauth
- + ################################################################
- +
- + inst-popauth: $(BINDIR)/popauth
- +
- + $(BINDIR)/popauth: xpopauth
- + -$(REMOVE) $@ zpopauth
- + cp xpopauth $@
- + -@chmod $(PGMPROT) $@
- + -$(CHOWN) $(POPUID) $@
- + chmod u+s $@
- + -@ls -l $@
- + -@echo ""
- +
- + popauth: xpopauth
- +
- + xpopauth: popauth.o $(LIBES1)
- + $(LD) $(LDFLAGS) -o $@ popauth.o $(LDLIBS2)
- +
- + l-popauth:; $(LINT) $(LFLAGS) popauth.c $(LLIBS2)
- +
- +
- + ################################################################
- # popwrd
- ***************
- *** 138,140 ****
- -chmod u-s zpopwrd
- ! cp xpopwrd $@
- -chmod $(PGMPROT) $@
- --- 188,190 ----
- -chmod u-s zpopwrd
- ! $(CP) xpopwrd $@
- -chmod $(PGMPROT) $@
- ***************
- *** 154,164 ****
- ################################################################
- - # popsbr
- - ################################################################
- -
- - popsbr: popsbr.o
- -
- - l-popsbr:; $(LINT) $(LFLAGS) popsbr.c $(LLIBS)
- -
- -
- - ################################################################
- # smtpd
- --- 204,205 ----
- ***************
- *** 170,172 ****
- -$(REMOVE) $@ zsmtpd
- ! cp xsmtpd $@
- -chmod 700 $@
- --- 211,213 ----
- -$(REMOVE) $@ zsmtpd
- ! $(CP) xsmtpd $@
- -chmod 700 $@
- ***************
- *** 188,189 ****
- --- 229,231 ----
- unconfig: distribution
- + -rm -f mmdfII/pop/lock.c
- -rm -f Makefile
- ***************
- *** 202,204 ****
-
- ! MODULES = popd popser popaka popwrd popsbr
-
- --- 244,246 ----
-
- ! MODULES = popd popser popaka popauth popwrd
-
- ***************
- *** 216,218 ****
- echo 'w' >> eddep
- ! cp Makefile _Makefile
- ed - Makefile < eddep
- --- 258,260 ----
- echo 'w' >> eddep
- ! $(CP) Makefile _Makefile
- ed - Makefile < eddep
- ***************
- *** 253,254 ****
- --- 295,297 ----
- #popser.o: /usr/include/sys/stat.h
- + popser.o: popauth.h
- popaka.o: popaka.c
- ***************
- *** 256,257 ****
- --- 299,305 ----
- popaka.o: ../../zotnet/bboards.h
- + popauth.o: popauth.c
- + popauth.o: ../../h/mh.h
- + popauth.o: popauth.h
- + popauth.o: ../../zotnet/bboards.h
- + popauth.o: ../../zotnet/mts.h
- popwrd.o: popwrd.c
- ***************
- *** 265,270 ****
- #popwrd.o: /usr/include/sys/file.h
- - popsbr.o: popsbr.c
- - popsbr.o: ../../h/strings.h
- - #popsbr.o: /usr/include/stdio.h
- - #popsbr.o: /usr/include/signal.h
- # DEPENDENCIES MUST END AT END OF FILE
- --- 313,314 ----
- *** ../mh-6.7.2/conf/makefiles/uip Fri Jan 24 15:19:02 1992
- --- conf/makefiles/uip Wed Nov 18 08:54:39 1992
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: uip,v 2.14 1992/01/24 23:18:46 jromine Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: uip,v 2.38 1992/11/18 16:54:29 jromine Exp $
- ##############################################################################
- ***************
- *** 71,72 ****
- --- 71,78 ----
- POPLLIBS= popsbr.c
- + @BEGIN: MPOP
- + POPCMDS = popi
- + IPOPCMDS= inst-popi
- + LPOPCMDS= l-popi
- + TPOPCMS= xpopi
- + @END: MPOP
- @BEGIN: SENDMTSHACK
- ***************
- *** 77,79 ****
- @END: SENDMTSHACK
- ! @END: POP
- @BEGIN: BPOP
- --- 83,87 ----
- @END: SENDMTSHACK
- ! @BEGIN: KPOP
- ! KRBLIB = -lkrb -ldes
- ! @END: KPOP
- @BEGIN: BPOP
- ***************
- *** 84,87 ****
- PSHLIB = pshsbr.o
- ! PSHLLIBS= pshsbr.c
- @END: NNTP
- @BEGIN: TMA
- --- 92,99 ----
- PSHLIB = pshsbr.o
- ! PSHLLIBS= -DPSHSBR popsbr.c
- @END: NNTP
- + @END: POP
- + @BEGIN: HESIOD
- + HESLIB = -lhesiod
- + @END: HESIOD
- @BEGIN: TMA
- ***************
- *** 102,103 ****
- --- 114,118 ----
-
- + CP = @(CP)
- + LN = @(LN)
- +
- CC = @(MHCOMPILER)
- ***************
- *** 121,122 ****
- --- 136,140 ----
- @END: STDLIB
- + @BEGIN: SUN4SHLIB
- + SLIBVER = .@(SLIBVER)
- + @END: SUN4SHLIB
- @BEGIN: SHAREDLIB
- ***************
- *** 124,126 ****
- ../zotnet/libzot.a
- ! LDLIBES = ../config/config.o -Bdynamic @(SLDFLAG) -lmh \
- ../mts/libmts.a ../zotnet/libzot.a
- --- 142,144 ----
- ../zotnet/libzot.a
- ! LDLIBES = ../config/config.o -Bdynamic @(SLDFLAG) -lmh$(SLIBVER) \
- ../mts/libmts.a ../zotnet/libzot.a
- ***************
- *** 135,136 ****
- --- 153,157 ----
- CMDS = ali anno burst comp dist folder folders forw inc mark mhmail \
- + @BEGIN: MIME
- + mhn \
- + @END: MIME
- mhpath msgchk msh next packf pick prev prompter refile repl \
- ***************
- *** 137,141 ****
- rmf rmm scan send show sortm vmh whatnow whom $(BBCMDS) \
- ! $(TMACMDS)
- MISC = ap conflict dp install-mh mhl post rcvdist rcvpack rcvstore \
- ! rcvtty fmtdump sendmail \
- @BEGIN: SENDMTS
- --- 158,165 ----
- rmf rmm scan send show sortm vmh whatnow whom $(BBCMDS) \
- ! $(TMACMDS) $(POPCMDS)
- MISC = ap conflict dp install-mh mhl post rcvdist rcvpack rcvstore \
- ! rcvtty fmtdump mhparam \
- ! @BEGIN: SMTP
- ! sendmail \
- ! @END: SMTP
- @BEGIN: SENDMTS
- ***************
- *** 147,148 ****
- --- 171,175 ----
- inst-folders inst-forw inst-inc inst-mark inst-mhmail \
- + @BEGIN: MIME
- + inst-mhn \
- + @END: MIME
- inst-mhpath inst-msgchk inst-msh inst-next inst-packf \
- ***************
- *** 150,152 ****
- inst-rmf inst-rmm inst-scan inst-send inst-show inst-sortm \
- ! inst-vmh inst-whatnow inst-whom $(IBBCMDS) $(ITMACMDS)
- IMISC = inst-ap inst-conflict inst-dp inst-install-mh inst-mhl \
- --- 177,180 ----
- inst-rmf inst-rmm inst-scan inst-send inst-show inst-sortm \
- ! inst-vmh inst-whatnow inst-whom $(IBBCMDS) $(ITMACMDS) \
- ! $(IPOPCMDS)
- IMISC = inst-ap inst-conflict inst-dp inst-install-mh inst-mhl \
- ***************
- *** 153,155 ****
- inst-post inst-rcvdist inst-rcvpack inst-rcvstore inst-rcvtty \
- ! inst-fmtdump inst-sendmail $(IMTSMISC) \
- @BEGIN: SENDMTS
- --- 181,187 ----
- inst-post inst-rcvdist inst-rcvpack inst-rcvstore inst-rcvtty \
- ! inst-fmtdump inst-mhparam \
- ! @BEGIN: SMTP
- ! inst-sendmail \
- ! @END: SMTP
- ! $(IMTSMISC) \
- @BEGIN: SENDMTS
- ***************
- *** 160,166 ****
- LCMDS = l-ali l-anno l-burst l-comp l-dist l-folder l-forw l-inc \
- ! l-mark l-mhmail l-mhpath l-msgchk l-msh l-packf l-pick \
- l-prompter l-refile l-repl l-rmf l-rmm l-scan l-send \
- ! l-show l-sortm l-vmh l-whatnow l-whom $(LBBCMDS) $(LTMACMDS)
- LMISC = l-ap l-conflict l-dp l-install-mh l-mhl l-post l-rcvdist \
- ! l-rcvpack l-rcvstore l-rcvtty l-fmtdump l-sendmail \
- $(LMTSMISC) $(LBBMISC) \
- --- 192,206 ----
- LCMDS = l-ali l-anno l-burst l-comp l-dist l-folder l-forw l-inc \
- ! l-mark l-mhmail \
- ! @BEGIN: MIME
- ! l-mhn \
- ! @END: MIME
- ! l-mhpath l-msgchk l-msh l-packf l-pick \
- l-prompter l-refile l-repl l-rmf l-rmm l-scan l-send \
- ! l-show l-sortm l-vmh l-whatnow l-whom $(LBBCMDS) $(LTMACMDS) \
- ! $(LPOPCMDS)
- LMISC = l-ap l-conflict l-dp l-install-mh l-mhl l-post l-rcvdist \
- ! l-rcvpack l-rcvstore l-rcvtty l-fmtdump l-mhparam \
- ! @BEGIN: SMTP
- ! l-sendmail \
- ! @END: SMTP
- $(LMTSMISC) $(LBBMISC) \
- ***************
- *** 172,178 ****
- TCMDS = xali xanno xburst xcomp xdist xfolder xforw xinc xmark \
- ! xmhmail xmhpath xmsgchk xmsh xpackf xpick xprompter xrefile \
- xrepl xrmf xrmm xscan xsend xshow xsortm xvmh xwhatnow xwhom \
- ! $(TBBCMDS) $(TTMACMDS)
- TMISC = xap xconflict xdp xinstall-mh xmhl xpost xrcvdist xrcvpack \
- ! xrcvstore xrcvtty xfmtdump xsendmail \
- $(TMTSMISC) $(TBBMISC) $(TPOPMISC) \
- --- 212,225 ----
- TCMDS = xali xanno xburst xcomp xdist xfolder xforw xinc xmark \
- ! xmhmail \
- ! @BEGIN: MIME
- ! xmhn \
- ! @END: MIME
- ! xmhpath xmsgchk xmsh xpackf xpick xprompter xrefile \
- xrepl xrmf xrmm xscan xsend xshow xsortm xvmh xwhatnow xwhom \
- ! $(TBBCMDS) $(TTMACMDS) $(TPOPCMDS)
- TMISC = xap xconflict xdp xinstall-mh xmhl xpost xrcvdist xrcvpack \
- ! xrcvstore xrcvtty xfmtdump xmhparam \
- ! @BEGIN: SMTP
- ! xsendmail \
- ! @END: SMTP
- $(TMTSMISC) $(TBBMISC) $(TPOPMISC) \
- ***************
- *** 217,219 ****
- -$(REMOVE) $@ zali
- ! cp xali $@
- -@chmod $(PGMPROT) $@
- --- 264,266 ----
- -$(REMOVE) $@ zali
- ! $(CP) xali $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 234,240 ****
- -$(REMOVE) $@ zanno
- ! cp xanno $@
- -@chmod $(PGMPROT) $@
- - @BEGIN: UCI
- - -@ln -s $@ $(BINDIR)/fanno
- - @END: UCI
- -@ls -l $@
- --- 281,284 ----
- -$(REMOVE) $@ zanno
- ! $(CP) xanno $@
- -@chmod $(PGMPROT) $@
- -@ls -l $@
- ***************
- *** 254,256 ****
- -$(REMOVE) $@ zap
- ! cp xap $@
- -@chmod $(PGMPROT) $@
- --- 298,300 ----
- -$(REMOVE) $@ zap
- ! $(CP) xap $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 274,276 ****
- @END: BPOP
- ! cp xbbc $@
- -@chmod $(PGMPROT) $@
- --- 318,320 ----
- @END: BPOP
- ! $(CP) xbbc $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 290,292 ****
- --- 334,343 ----
-
- + pshsbr.c: popsbr.c
- + rm -f $@
- + $(LN) popsbr.c $@
-
- + pshsbr.o: pshsbr.c
- + $(CC) $(CFLAGS) -DPSHSBR -c pshsbr.c
- +
- +
- inst-bbl: $(BINDIR)/bbl
- ***************
- *** 296,298 ****
- -chmod u-s zbbl
- ! cp xbbl $@
- -chmod $(PGMPROT) $@
- --- 347,349 ----
- -chmod u-s zbbl
- ! $(CP) xbbl $@
- -chmod $(PGMPROT) $@
- ***************
- *** 315,317 ****
- -$(REMOVE) $@ zburst
- ! cp xburst $@
- -@chmod $(PGMPROT) $@
- --- 366,368 ----
- -$(REMOVE) $@ zburst
- ! $(CP) xburst $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 332,334 ****
- -$(REMOVE) $@ zcipher
- ! cp xcipher $@
- -@chmod $(PGMPROT) $@
- --- 383,385 ----
- -$(REMOVE) $@ zcipher
- ! $(CP) xcipher $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 349,351 ****
- -$(REMOVE) $@ zcomp
- ! cp xcomp $@
- -@chmod $(PGMPROT) $@
- --- 400,402 ----
- -$(REMOVE) $@ zcomp
- ! $(CP) xcomp $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 356,360 ****
-
- ! xcomp: comp.o \
- whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES)
- ! $(LD) $(LDFLAGS) -o $@ comp.o \
- whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LDLIBS)
- --- 407,411 ----
-
- ! xcomp: comp.o whatnowproc.o \
- whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES)
- ! $(LD) $(LDFLAGS) -o $@ comp.o whatnowproc.o \
- whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LDLIBS)
- ***************
- *** 361,363 ****
-
- ! l-comp:; $(LINT) $(LFLAGS) comp.c \
- whatnowsbr.c sendsbr.c annosbr.c distsbr.c $(LLIBS)
- --- 412,414 ----
-
- ! l-comp:; $(LINT) $(LFLAGS) comp.c whatnowproc.c \
- whatnowsbr.c sendsbr.c annosbr.c distsbr.c $(LLIBS)
- ***************
- *** 369,371 ****
- -$(REMOVE) $@ zconflict
- ! cp xconflict $@
- -@chmod $(PGMPROT) $@
- --- 420,422 ----
- -$(REMOVE) $@ zconflict
- ! $(CP) xconflict $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 386,388 ****
- -$(REMOVE) $@ zdecipher
- ! cp xdecipher $@
- -@chmod $(PGMPROT) $@
- --- 437,439 ----
- -$(REMOVE) $@ zdecipher
- ! $(CP) xdecipher $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 403,405 ****
- -$(REMOVE) $@ zdist
- ! cp xdist $@
- -@chmod $(PGMPROT) $@
- --- 454,456 ----
- -$(REMOVE) $@ zdist
- ! $(CP) xdist $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 410,414 ****
-
- ! xdist: dist.o \
- whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES)
- ! $(LD) $(LDFLAGS) -o $@ dist.o \
- whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LDLIBS)
- --- 461,465 ----
-
- ! xdist: dist.o whatnowproc.o \
- whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES)
- ! $(LD) $(LDFLAGS) -o $@ dist.o whatnowproc.o \
- whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LDLIBS)
- ***************
- *** 415,417 ****
-
- ! l-dist:; $(LINT) $(LFLAGS) dist.c \
- whatnowsbr.c sendsbr.c annosbr.c distsbr.c $(LLIBS)
- --- 466,468 ----
-
- ! l-dist:; $(LINT) $(LFLAGS) dist.c whatnowproc.c \
- whatnowsbr.c sendsbr.c annosbr.c distsbr.c $(LLIBS)
- ***************
- *** 423,425 ****
- -$(REMOVE) $@ zdp
- ! cp xdp $@
- -@chmod $(PGMPROT) $@
- --- 474,476 ----
- -$(REMOVE) $@ zdp
- ! $(CP) xdp $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 448,450 ****
- xfmtdump: fmtdump.o trmsbr.o $(LIBES)
- ! $(LD) $(LDFLAGS) -o $@ fmtdump.o $(LDLIBS) $(LDCURSES)
-
- --- 499,501 ----
- xfmtdump: fmtdump.o trmsbr.o $(LIBES)
- ! $(LD) $(LDFLAGS) -o $@ fmtdump.o $(LDLIBS)
-
- ***************
- *** 458,460 ****
- -$(REMOVE) $@ zfolder
- ! cp xfolder $@
- -@chmod $(PGMPROT) $@
- --- 509,511 ----
- -$(REMOVE) $@ zfolder
- ! $(CP) xfolder $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 478,480 ****
- -$(REMOVE) $@ zforw
- ! cp xforw $@
- -@chmod $(PGMPROT) $@
- --- 529,531 ----
- -$(REMOVE) $@ zforw
- ! $(CP) xforw $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 485,489 ****
-
- ! xforw: forw.o \
- whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES)
- ! $(LD) $(LDFLAGS) -o $@ forw.o \
- whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LDLIBS)
- --- 536,540 ----
-
- ! xforw: forw.o whatnowproc.o \
- whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES)
- ! $(LD) $(LDFLAGS) -o $@ forw.o whatnowproc.o \
- whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LDLIBS)
- ***************
- *** 490,492 ****
-
- ! l-forw:; $(LINT) $(LFLAGS) forw.c \
- whatnowsbr.c sendsbr.c annosbr.c distsbr.c $(LLIBS)
- --- 541,543 ----
-
- ! l-forw:; $(LINT) $(LFLAGS) forw.c whatnowproc.c \
- whatnowsbr.c sendsbr.c annosbr.c distsbr.c $(LLIBS)
- ***************
- *** 501,503 ****
- @END: POP
- ! cp xinc $@
- -@chmod $(PGMPROT) $@
- --- 552,554 ----
- @END: POP
- ! $(CP) xinc $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 516,522 ****
-
- ! xinc: inc.o scansbr.o \
- ! dropsbr.o trmsbr.o $(POPLIB) $(TMALIB) $(LIBES)
- ! $(LD) $(LDFLAGS) -o $@ inc.o scansbr.o \
- ! dropsbr.o trmsbr.o $(POPLIB) $(TMALIB) $(LDLIBS) \
- ! $(LDCURSES)
-
- --- 567,573 ----
-
- ! xinc: inc.o scansbr.o dropsbr.o trmsbr.o \
- ! $(POPLIB) $(TMALIB) $(LIBES)
- ! $(LD) $(LDFLAGS) -o $@ inc.o scansbr.o dropsbr.o \
- ! trmsbr.o $(POPLIB) $(TMALIB) $(KRBLIB) $(HESLIB) \
- ! $(LDLIBS) $(LDCURSES)
-
- ***************
- *** 530,532 ****
- -$(REMOVE) $@ zinstall-mh
- ! cp xinstall-mh $@
- -@chmod $(PGMPROT) $@
- --- 581,583 ----
- -$(REMOVE) $@ zinstall-mh
- ! $(CP) xinstall-mh $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 547,549 ****
- -$(REMOVE) $@ zkdsc
- ! cp xkdsc $@
- -@chmod $(PGMPROT) $@
- --- 598,600 ----
- -$(REMOVE) $@ zkdsc
- ! $(CP) xkdsc $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 564,566 ****
- -$(REMOVE) $@ zmark
- ! cp xmark $@
- -@chmod $(PGMPROT) $@
- --- 615,617 ----
- -$(REMOVE) $@ zmark
- ! $(CP) xmark $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 581,583 ****
- -$(REMOVE) $@ zmhl
- ! cp xmhl $@
- -@chmod $(PGMPROT) $@
- --- 632,634 ----
- -$(REMOVE) $@ zmhl
- ! $(CP) xmhl $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 601,603 ****
- -$(REMOVE) $@ zmhmail
- ! cp xmhmail $@
- -@chmod $(PGMPROT) $@
- --- 652,654 ----
- -$(REMOVE) $@ zmhmail
- ! $(CP) xmhmail $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 614,615 ****
- --- 665,701 ----
-
- + inst-mhn: $(BINDIR)/mhn
- +
- + $(BINDIR)/mhn: xmhn
- + -$(REMOVE) $@ zmhn
- + cp xmhn $@
- + -@chmod $(PGMPROT) $@
- + -@ls -l $@
- + -@echo ""
- +
- + mhn: xmhn
- +
- + xmhn: mhn.o ftpsbr.o trmsbr.o $(LIBES)
- + $(LD) $(LDFLAGS) -o $@ mhn.o ftpsbr.o trmsbr.o \
- + $(LDLIBS) $(LDCURSES)
- +
- + l-mhn:; $(LINT) $(LFLAGS) mhn.c ftpsbr.c trmsbr.c $(LLIBS)
- +
- +
- + inst-mhparam: $(BINDIR)/mhparam
- +
- + $(BINDIR)/mhparam: xmhparam
- + -$(REMOVE) $@ zmhparam
- + cp xmhparam $@
- + -@chmod $(PGMPROT) $@
- + -@ls -l $@
- + -@echo ""
- +
- + mhparam: xmhparam
- +
- + xmhparam: mhparam.o trmsbr.o $(LIBES)
- + $(LD) $(LDFLAGS) -o $@ mhparam.o $(LDLIBS) $(LDCURSES)
- +
- + l-mhparam:; $(LINT) $(LFLAGS) mhparam.c $(LLIBS)
- +
- +
- inst-mhpath: $(BINDIR)/mhpath
- ***************
- *** 618,620 ****
- -$(REMOVE) $@ zmhpath
- ! cp xmhpath $@
- -@chmod $(PGMPROT) $@
- --- 704,706 ----
- -$(REMOVE) $@ zmhpath
- ! $(CP) xmhpath $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 638,640 ****
- @END: POP
- ! cp xmsgchk $@
- -@chmod $(PGMPROT) $@
- --- 724,726 ----
- @END: POP
- ! $(CP) xmsgchk $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 650,652 ****
- xmsgchk: msgchk.o $(POPLIB) $(LIBES)
- ! $(LD) $(LDFLAGS) -o $@ msgchk.o $(POPLIB) $(LDLIBS)
-
- --- 736,739 ----
- xmsgchk: msgchk.o $(POPLIB) $(LIBES)
- ! $(LD) $(LDFLAGS) -o $@ msgchk.o $(POPLIB) \
- ! $(KRBLIB) $(HESLIB) $(LDLIBS)
-
- ***************
- *** 659,661 ****
- -$(REMOVE) $@ zmsh
- ! cp xmsh $@
- -@chmod $(PGMPROT) $@
- --- 746,748 ----
- -$(REMOVE) $@ zmsh
- ! $(CP) xmsh $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 682,684 ****
- -$(REMOVE) $@ zpackf
- ! cp xpackf $@
- -@chmod $(PGMPROT) $@
- --- 769,771 ----
- -$(REMOVE) $@ zpackf
- ! $(CP) xpackf $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 699,701 ****
- -$(REMOVE) $@ zpick
- ! cp xpick $@
- -@chmod $(PGMPROT) $@
- --- 786,788 ----
- -$(REMOVE) $@ zpick
- ! $(CP) xpick $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 712,713 ****
- --- 799,818 ----
-
- + inst-popi: $(BINDIR)/popi
- +
- + $(BINDIR)/popi: xpopi
- + -$(REMOVE) $@ zpopi
- + cp xpopi $@
- + -@chmod $(PGMPROT) $@
- + -@ls -l $@
- + -@echo ""
- +
- + popi: xpopi
- +
- + xpopi: popi.o $(POPLIB) trmsbr.o $(LIBES)
- + $(LD) $(LDFLAGS) -o $@ popi.o $(POPLIB) trmsbr.o $(LDLIBS) \
- + $(LDCURSES)
- +
- + l-popi:; $(LINT) $(LFLAGS) popi.c $(POPLLIBS) trmsbr.c $(LLIBS)
- +
- +
- inst-post: $(ETCDIR)/post
- ***************
- *** 719,721 ****
- @END: MHMTS
- ! cp xpost $@
- -@chmod $(PGMPROT) $@
- --- 824,826 ----
- @END: MHMTS
- ! $(CP) xpost $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 743,745 ****
- -$(REMOVE) $@ zprompter
- ! cp xprompter $@
- -@chmod $(PGMPROT) $@
- --- 848,850 ----
- -$(REMOVE) $@ zprompter
- ! $(CP) xprompter $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 760,762 ****
- -$(REMOVE) $@ zrcvdist
- ! cp xrcvdist $@
- -@chmod $(PGMPROT) $@
- --- 865,867 ----
- -$(REMOVE) $@ zrcvdist
- ! $(CP) xrcvdist $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 777,779 ****
- -$(REMOVE) $@ zrcvpack
- ! cp xrcvpack $@
- -@chmod $(PGMPROT) $@
- --- 882,884 ----
- -$(REMOVE) $@ zrcvpack
- ! $(CP) xrcvpack $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 794,796 ****
- -$(REMOVE) $@ zrcvstore
- ! cp xrcvstore $@
- -@chmod $(PGMPROT) $@
- --- 899,901 ----
- -$(REMOVE) $@ zrcvstore
- ! $(CP) xrcvstore $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 811,813 ****
- -$(REMOVE) $@ zrcvtty
- ! cp xrcvtty $@
- -@chmod $(PGMPROT) $@
- --- 916,918 ----
- -$(REMOVE) $@ zrcvtty
- ! $(CP) xrcvtty $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 822,830 ****
-
- ! xrcvtty: rcvtty.o \
- ! scansbr.o trmsbr.o ttyw.o $(LIBES)
- ! $(LD) $(LDFLAGS) -o $@ rcvtty.o \
- ! scansbr.o trmsbr.o ttyw.o $(LDLIBS) $(LDCURSES)
-
- ! l-rcvtty:; $(LINT) $(LFLAGS) rcvtty.c \
- ! scansbr.c trmsbr.c ttyw.c $(LLIBS)
-
- --- 927,944 ----
-
- ! xrcvtty: rcvtty.o scansbr.o trmsbr.o \
- ! @BEGIN: TTYD
- ! ttyw.o \
- ! @END: TTYD
- ! $(LIBES)
- ! $(LD) $(LDFLAGS) -o $@ rcvtty.o scansbr.o trmsbr.o \
- ! @BEGIN: TTYD
- ! ttyw.o \
- ! @END: TTYD
- ! $(LDLIBS) $(LDCURSES)
-
- ! l-rcvtty:; $(LINT) $(LFLAGS) rcvtty.c scansbr.c trmsbr.c \
- ! @BEGIN: TTYD
- ! ttyw.c \
- ! @END: TTYD
- ! $(LLIBS)
-
- ***************
- *** 835,837 ****
- -$(REMOVE) $@ zrefile
- ! cp xrefile $@
- -@chmod $(PGMPROT) $@
- --- 949,951 ----
- -$(REMOVE) $@ zrefile
- ! $(CP) xrefile $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 852,854 ****
- -$(REMOVE) $@ zrepl
- ! cp xrepl $@
- -@chmod $(PGMPROT) $@
- --- 966,968 ----
- -$(REMOVE) $@ zrepl
- ! $(CP) xrepl $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 859,863 ****
-
- ! xrepl: repl.o replsbr.o \
- whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES)
- ! $(LD) $(LDFLAGS) -o $@ repl.o replsbr.o \
- whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LDLIBS)
- --- 973,977 ----
-
- ! xrepl: repl.o replsbr.o whatnowproc.o \
- whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES)
- ! $(LD) $(LDFLAGS) -o $@ repl.o replsbr.o whatnowproc.o \
- whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LDLIBS)
- ***************
- *** 864,866 ****
-
- ! l-repl:; $(LINT) $(LFLAGS) repl.c replsbr.c \
- whatnowsbr.c sendsbr.c annosbr.c distsbr.c $(LLIBS)
- --- 978,980 ----
-
- ! l-repl:; $(LINT) $(LFLAGS) repl.c replsbr.c whatnowproc.c \
- whatnowsbr.c sendsbr.c annosbr.c distsbr.c $(LLIBS)
- ***************
- *** 873,875 ****
- -chmod u-s zrmail
- ! cp xrmail $@
- -@chmod $(PGMPROT) $@
- --- 987,989 ----
- -chmod u-s zrmail
- ! $(CP) xrmail $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 892,894 ****
- -$(REMOVE) $@ zrmf
- ! cp xrmf $@
- -@chmod $(PGMPROT) $@
- --- 1006,1008 ----
- -$(REMOVE) $@ zrmf
- ! $(CP) xrmf $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 909,911 ****
- -$(REMOVE) $@ zrmm
- ! cp xrmm $@
- -@chmod $(PGMPROT) $@
- --- 1023,1025 ----
- -$(REMOVE) $@ zrmm
- ! $(CP) xrmm $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 926,928 ****
- -$(REMOVE) $@ zscan
- ! cp xscan $@
- -@chmod $(PGMPROT) $@
- --- 1040,1042 ----
- -$(REMOVE) $@ zscan
- ! $(CP) xscan $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 946,948 ****
- -$(REMOVE) $@ zsend
- ! cp xsend $@
- -@chmod $(PGMPROT) $@
- --- 1060,1062 ----
- -$(REMOVE) $@ zsend
- ! $(CP) xsend $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 968,970 ****
- -$(REMOVE) $@ zshow
- ! cp xshow $@
- -@chmod $(PGMPROT) $@
- --- 1082,1084 ----
- -$(REMOVE) $@ zshow
- ! $(CP) xshow $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 997,999 ****
- @END: SENDMTS
- ! cp xsbboards $@
- -chmod $(PGMPROT) $@
- --- 1111,1113 ----
- @END: SENDMTS
- ! $(CP) xsbboards $@
- -chmod $(PGMPROT) $@
- ***************
- *** 1018,1020 ****
- -$(REMOVE) $@ zslocal
- ! cp xslocal $@
- -chmod $(PGMPROT) $@
- --- 1132,1134 ----
- -$(REMOVE) $@ zslocal
- ! $(CP) xslocal $@
- -chmod $(PGMPROT) $@
- ***************
- *** 1035,1037 ****
- -$(REMOVE) $@ zsortm
- ! cp xsortm $@
- -@chmod $(PGMPROT) $@
- --- 1149,1151 ----
- -$(REMOVE) $@ zsortm
- ! $(CP) xsortm $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 1053,1055 ****
- -chmod u-s zspop
- ! cp xspop $@
- -chmod $(PGMPROT) $@
- --- 1167,1169 ----
- -chmod u-s zspop
- ! $(CP) xspop $@
- -chmod $(PGMPROT) $@
- ***************
- *** 1076,1078 ****
- -$(REMOVE) $@ zspost
- ! cp xspost $@
- -@chmod $(PGMPROT) $@
- --- 1190,1192 ----
- -$(REMOVE) $@ zspost
- ! $(CP) xspost $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 1090,1091 ****
- --- 1204,1206 ----
-
- + @BEGIN: SMTP
- inst-sendmail: $(ETCDIR)/sendmail
- ***************
- *** 1106,1109 ****
- l-sendmail:; $(LINT) $(LFLAGS) sendmail.c $(LLIBS)
-
- -
- inst-tma: $(BINDIR)/tma
- --- 1221,1224 ----
- l-sendmail:; $(LINT) $(LFLAGS) sendmail.c $(LLIBS)
- + @END: SMTP
-
- inst-tma: $(BINDIR)/tma
- ***************
- *** 1112,1114 ****
- -$(REMOVE) $@ ztma
- ! cp xtma $@
- -@chmod $(PGMPROT) $@
- --- 1227,1229 ----
- -$(REMOVE) $@ ztma
- ! $(CP) xtma $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 1129,1131 ****
- -$(REMOVE) $@ zumhook
- ! cp xumhook $@
- -@chmod $(PGMPROT) $@
- --- 1244,1246 ----
- -$(REMOVE) $@ zumhook
- ! $(CP) xumhook $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 1146,1148 ****
- -$(REMOVE) $@ zvmh
- ! cp xvmh $@
- -@chmod $(PGMPROT) $@
- --- 1261,1263 ----
- -$(REMOVE) $@ zvmh
- ! $(CP) xvmh $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 1154,1156 ****
- xvmh: vmh.o vmhsbr.o $(LIBES)
- ! $(LD) $(LDFLAGS) -o $@ vmh.o vmhsbr.o $(LDLIBS) $(LDCURSES)
-
- --- 1269,1271 ----
- xvmh: vmh.o vmhsbr.o $(LIBES)
- ! $(LD) $(LDFLAGS) -o $@ vmh.o vmhsbr.o $(LDCURSES) $(LDLIBS)
-
- ***************
- *** 1167,1169 ****
- -$(REMOVE) $@ zwhatnow
- ! cp xwhatnow $@
- -@chmod $(PGMPROT) $@
- --- 1282,1284 ----
- -$(REMOVE) $@ zwhatnow
- ! $(CP) xwhatnow $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 1187,1189 ****
- -$(REMOVE) $@ zwhom
- ! cp xwhom $@
- -@chmod $(PGMPROT) $@
- --- 1302,1304 ----
- -$(REMOVE) $@ zwhom
- ! $(CP) xwhom $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 1204,1206 ****
- -$(REMOVE) $@ zwmh
- ! cp xwmh $@
- -@chmod $(PGMPROT) $@
- --- 1319,1321 ----
- -$(REMOVE) $@ zwmh
- ! $(CP) xwmh $@
- -@chmod $(PGMPROT) $@
- ***************
- *** 1342,1344 ****
- --- 1457,1461 ----
- #bbc.o: /usr/include/stdio.h
- + @BEGIN: BPOP
- bbc.o: ../zotnet/mts.h
- + @END: BPOP
- #bbc.o: /usr/include/errno.h
- ***************
- *** 1440,1441 ****
- --- 1557,1569 ----
- #fmtdump.o: /usr/include/stdio.h
- + ftpsbr.o: ftpsbr.c
- + ftpsbr.o: ../h/mh.h
- + ftpsbr.o: ../h/mhn.h
- + #ftpsbr.o: /usr/include/ctype.h
- + #ftpsbr.o: /usr/include/stdio.h
- + #ftpsbr.o: /usr/include/arpa/ftp.h
- + #ftpsbr.o: /usr/include/varargs.h
- + #ftpsbr.o: /usr/include/sys/types.h
- + #ftpsbr.o: /usr/include/sys/socket.h
- + #ftpsbr.o: /usr/include/netinet/in.h
- + #ftpsbr.o: /usr/include/netdb.h
- inc.o: inc.c
- ***************
- *** 1481,1482 ****
- --- 1609,1624 ----
- #mhmail.o: /usr/include/signal.h
- + mhn.o: mhn.c
- + mhn.o: ../h/mh.h
- + mhn.o: ../h/mhn.h
- + #mhn.o: /usr/include/ctype.h
- + #mhn.o: /usr/include/errno.h
- + #mhn.o: /usr/include/signal.h
- + #mhn.o: /usr/include/stdio.h
- + #mhn.o: /usr/include/sys/types.h
- + #mhn.o: /usr/include/sys/stat.h
- + #mhn.o: /usr/include/sys/wait.h
- + mhparam.o: mhparam.c
- + mhparam.o: ../h/mh.h
- + mhparam.o: ../h/strings.h
- + #mhparam.o: /usr/include/stdio.h
- mhpath.o: mhpath.c
- ***************
- *** 1523,1524 ****
- --- 1665,1669 ----
- mshcmds.o: ../h/mshsbr.h
- + @BEGIN: MIME
- + mshcmds.o: ../h/mhn.h
- + @END: MIME
- packf.o: packf.c
- ***************
- *** 1539,1540 ****
- --- 1684,1704 ----
- #popsbr.o: /usr/include/signal.h
- + pshsbr.o: popsbr.c
- + pshsbr.o: ../h/strings.h
- + pshsbr.o: ../h/nntp.h
- + #pshsbr.o: /usr/include/stdio.h
- + #pshsbr.o: /usr/include/signal.h
- + popi.o: popi.c
- + popi.o: ../h/mh.h
- + popi.o: ../h/strings.h
- + popi.o: ../h/formatsbr.h
- + popi.o: ../h/scansbr.h
- + popi.o: ../zotnet/mts.h
- + #popi.o: /usr/include/errno.h
- + #popi.o: /usr/include/sys/errno.h
- + #popi.o: /usr/include/stdio.h
- + #popi.o: /usr/include/sys/types.h
- + #popi.o: /usr/include/sys/stdtypes.h
- + #popi.o: /usr/include/sys/sysmacros.h
- + #popi.o: /usr/include/sys/stat.h
- + #popi.o: /usr/include/sys/types.h
- post.o: post.c
- ***************
- *** 1660,1661 ****
- --- 1824,1848 ----
- #send.o: /usr/include/sys/stat.h
- + @BEGIN: SMTP
- + sendmail.o: sendmail.c
- + sendmail.o: ../h/mh.h
- + sendmail.o: ../h/strings.h
- + sendmail.o: ../h/addrsbr.h
- + sendmail.o: ../h/aliasbr.h
- + sendmail.o: ../h/dropsbr.h
- + sendmail.o: ../zotnet/tws.h
- + sendmail.o: ../zotnet/mts.h
- + #sendmail.o: /usr/include/ctype.h
- + #sendmail.o: /usr/include/errno.h
- + #sendmail.o: /usr/include/sys/errno.h
- + #sendmail.o: /usr/include/setjmp.h
- + #sendmail.o: /usr/include/machine/setjmp.h
- + #sendmail.o: /usr/include/stdio.h
- + #sendmail.o: /usr/include/sys/types.h
- + #sendmail.o: /usr/include/sys/stdtypes.h
- + #sendmail.o: /usr/include/sys/sysmacros.h
- + #sendmail.o: /usr/include/signal.h
- + #sendmail.o: /usr/include/sys/signal.h
- + #sendmail.o: /usr/include/vm/faultcode.h
- + #sendmail.o: /usr/include/sys/stdtypes.h
- + @END: SMTP
- sendsbr.o: sendsbr.c
- ***************
- *** 1667,1668 ****
- --- 1854,1858 ----
- #sendsbr.o: /usr/include/sys/stat.h
- + @BEGIN: MIME
- + sendsbr.o: ../h/mhn.h
- + @END: MIME
- show.o: show.c
- ***************
- *** 1670,1671 ****
- --- 1860,1864 ----
- #show.o: /usr/include/stdio.h
- + @BEGIN: MIME
- + show.o: ../h/mhn.h
- + @END: MIME
- slocal.o: slocal.c
- ***************
- *** 1723,1724 ****
- --- 1916,1918 ----
- #trmsbr.o: /usr/include/sys/ioctl.h
- + @BEGIN: TTYD
- ttym.o: ttym.c
- ***************
- *** 1738,1739 ****
- --- 1932,1934 ----
- ttyw.o: ttym.c
- + @END: TTYD
- umhook.o: umhook.c
- ***************
- *** 1768,1769 ****
- --- 1963,1968 ----
- whatnow.o: whatnow.c
- + whatnowproc.o: whatnowproc.c
- + whatnowproc.o: ../h/mh.h
- + whatnowproc.o: ../h/strings.h
- + #whatnowproc.o: /usr/include/stdio.h
- whatnowsbr.o: whatnowsbr.c
- *** ../mh-6.7.2/conf/makefiles/zotnet/bboards Wed Jan 29 15:06:46 1992
- --- conf/makefiles/zotnet/bboards Thu Nov 12 15:22:54 1992
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: bboards,v 1.6 1990/04/05 15:16:32 sources Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: bboards,v 1.7 1992/11/12 23:22:48 jromine Exp $
- ##############################################################################
- ***************
- *** 27,29 ****
-
- ! all: getbbent
-
- --- 27,29 ----
-
- ! all: getbbent.o
-
- *** ../mh-6.7.2/conf/makefiles/zotnet/mts Wed Jan 29 15:10:19 1992
- --- conf/makefiles/zotnet/mts Thu Feb 6 09:29:08 1992
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: mts,v 1.7 1992/01/29 23:10:03 jromine Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: mts,v 1.8 1992/02/06 17:29:00 jromine Exp $
- ##############################################################################
- ***************
- *** 32,33 ****
- --- 32,37 ----
-
- + OFILES = mts.o lock.o client.o
- + LFILES = l-mts l-lock l-client
- + IFILES = inst-mtstailor
- +
- .c:; echo $@
- ***************
- *** 38,42 ****
-
- ! all: mts lock client
-
- ! lint: l-mts l-lock l-client
-
- --- 42,46 ----
-
- ! all: $(OFILES)
-
- ! lint: $(LFILES)
-
- ***************
- *** 44,46 ****
-
- ! inst-all: inst-mtstailor
-
- --- 48,50 ----
-
- ! inst-all: $(IFILES)
-
- *** ../mh-6.7.2/conf/makefiles/zotnet/tws Wed Jan 29 16:31:24 1992
- --- conf/makefiles/zotnet/tws Fri Nov 20 09:26:04 1992
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: tws,v 1.10 1992/01/30 00:31:18 jromine Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: tws,v 1.15 1992/11/18 16:54:16 jromine Exp $
- ##############################################################################
- ***************
- *** 15,16 ****
- --- 15,17 ----
- CC = @(MHCOMPILER)
- + LN = @(LN)
- LEX = @(LEX)
- ***************
- *** 29,30 ****
- --- 30,34 ----
-
- + OFILES = dtimep.o lexstring.o dtime.o
- + LFILES = l-dtimep l-dtime l-date
- +
- .c:; echo $@
- ***************
- *** 35,39 ****
-
- ! all: dtimep dtime date
-
- ! lint: l-dtimep l-dtime l-date
-
- --- 39,43 ----
-
- ! all: $(OFILES) date
-
- ! lint: $(LFILES)
-
- ***************
- *** 64,66 ****
- dtimep: dtimep.o lexstring.o
- !
- dtimep.o: dtimep.c
- --- 68,70 ----
- dtimep: dtimep.o lexstring.o
- !
- dtimep.o: dtimep.c
- ***************
- *** 77,85 ****
- ######################################################################
- -
- - lex: zap-dtime dtimep.c
- -
- - zap-dtime:; rm -f dtimep.c
- -
- -
- - ######################################################################
- # dtime
- --- 81,82 ----
- ***************
- *** 96,97 ****
- --- 93,97 ----
-
- + tws.h: ../tws.h
- + rm -f $@
- + $(LN) ../tws.h $@
-
- ***************
- *** 103,105 ****
- clean: unclean
- ! -rm -f *.o date
-
- --- 103,105 ----
- clean: unclean
- ! -rm -f dtimep.c *.o date
-
- *** ../mh-6.7.2/conf/makefiles/zotnetM Thu Apr 5 16:05:22 1990
- --- conf/makefiles/zotnetM Thu Oct 29 08:25:26 1992
- ***************
- *** 4,6 ****
- # @(MHWARNING)
- ! # @(#)$Id: zotnetM,v 2.5 90/04/05 15:18:23 sources Exp $
- ##############################################################################
- --- 4,6 ----
- # @(MHWARNING)
- ! # @(#)$Id: zotnetM,v 2.7 1992/10/29 16:25:20 jromine Exp $
- ##############################################################################
- *** ../mh-6.7.2/conf/mh-gen.8 Thu Jan 30 08:41:44 1992
- --- conf/mh-gen.8 Mon Dec 14 09:19:25 1992
- ***************
- *** 1,2 ****
- ! .\" @(#)$Id: mh-gen.8,v 2.55 1992/01/30 16:41:35 jromine Exp $
- .\" uneven inter-word spacing (nroff line adjusting) hampers readability
- --- 1,2 ----
- ! .\" @(#)$Id: mh-gen.8,v 2.105 1992/12/14 17:19:19 jromine Exp $
- .\" uneven inter-word spacing (nroff line adjusting) hampers readability
- ***************
- *** 3,5 ****
- .if n .na
- ! .TH MH-GEN 8 MH [mh.6]
- .SH NAME
- --- 3,5 ----
- .if n .na
- ! .TH MH-GEN 8 MH.6.8 [mh.6]
- .SH NAME
- ***************
- *** 11,13 ****
- also want to familiarize yourself with the \fIMH\fP Administrator's
- ! Guide before you install \fIMH\fP.
- .SH DISCLAIMER
- --- 11,14 ----
- also want to familiarize yourself with the \fIMH\fP Administrator's
- ! Guide before you install \fIMH\fP. A copy can be found in the
- ! file \fBdoc/ADMIN.doc\fP is the \fIMH\fP sources.
- .SH DISCLAIMER
- ***************
- *** 66,70 ****
- 1. If you can FTP to the ARPA Internet, use anonymous FTP to
- ! ics.uci.edu [128.195.1.1] and retrieve the file pub/mh/mh-6.7.tar.Z.
- This is a tar image after being run through the compress program
- ! (approximately 1.5MB). There should also be a \fBREADME\fR file in
- that directory which tells what the current release of \fIMH\fP
- --- 67,71 ----
- 1. If you can FTP to the ARPA Internet, use anonymous FTP to
- ! ftp.ics.uci.edu [128.195.1.1] and retrieve the file pub/mh/mh-6.8.tar.Z.
- This is a tar image after being run through the compress program
- ! (approximately 1.8MB). There should also be a \fBREADME\fR file in
- that directory which tells what the current release of \fIMH\fP
- ***************
- *** 73,75 ****
- This tar file is also available on louie.udel.edu
- ! [128.175.1.3] in portal/mh-6.7.tar.Z. You may also find MH on
- various other hosts; to make sure you get the latest version and
- --- 74,76 ----
- This tar file is also available on louie.udel.edu
- ! [128.175.1.3] in portal/mh-6.8.tar.Z. You may also find MH on
- various other hosts; to make sure you get the latest version and
- ***************
- *** 76,78 ****
- don't waste your time re-fixing bugs, it's best to get it from
- ! either ics.uci.edu or louie.udel.edu.
- .PP
- --- 77,79 ----
- don't waste your time re-fixing bugs, it's best to get it from
- ! either ftp.ics.uci.edu or louie.udel.edu.
- .PP
- ***************
- *** 92,100 ****
- .RS 1i
- ! Computing Support Group
- ! Attn: MH distribution
- ! Department of Information and Computer Science
- ! University of California, Irvine
- ! Irvine, CA 92717
-
- ! 714/856-7554
- .fi
- --- 93,100 ----
- .RS 1i
- ! Univeristy of California at Irvine
- ! Office of Academic Computing
- ! 360 Computer Science
- ! Irvine, CA 92717 USA
-
- ! +1 714 856 5153
- .fi
- ***************
- *** 115,120 ****
- .PP
- ! Become the super-user and create a new directory under /usr/src/local/
- ! (or whatever) for the \fIMH\fR area.
- ! Traditionally, the directory's name should be mh/.
- ! The distribution tape contains the hierarchy for the mh.6/ directory.
- Bring the sources on-line:
- --- 115,119 ----
- .PP
- ! Become the super-user and cd to /usr/src/local/
- ! (or whatever you keep your local sources).
- ! The distribution tape contains the hierarchy for the mh.6-8/ directory.
- Bring the sources on-line:
- ***************
- *** 122,126 ****
- .nf
- ! # mkdir /usr/src/local/mh
- ! % cd /usr/src/local/mh
- % tar xv
- .fi
- --- 121,125 ----
- .nf
- ! # cd /usr/src/local
- % tar xv
- + % cd mh-6.8
- .fi
- ***************
- *** 139,140 ****
- --- 138,140 ----
- produce customized files.
- + .sp
- For examples of various configurations,
- ***************
- *** 142,146 ****
- The file \fBMH\fR provided in \fBconf/\fR is a reasonable default.
- .PP
- ! Here are the \fIMH\fP configuration options available:
- .in +.5i
- .ti -.5i
- --- 142,162 ----
- The file \fBMH\fR provided in \fBconf/\fR is a reasonable default.
- + Lines beginning with `#' are comments, and are not otherwise interpreted.
- .PP
- ! Here are the \fIMH\fP configuration directives available. Be sure
- ! to read through this list completely before attempting to decide
- ! what directives are appropriate for your system.
- ! .sp
- ! More information on some of these options is available in the
- ! the \fIAdministrator's Guide\fR. If you do not have a printed
- ! copy, you should configure your system with the default
- ! configuration file, \fBMH\fP, then generate and print a copy
- ! of the guide (as described below).
- .in +.5i
- +
- + .de Uh
- + .ti -.75i
- + .B "\\$1"
- + .ne 4
- + ..
- + .Uh "Installation paths"
- .ti -.5i
- ***************
- *** 151,159 ****
- .ti -.5i
- - debug: off
- - .br
- - Support for debug mode of \fIMH\fR.
- - Don't use this unless you know what you're doing,
- - which isn't likely if you're reading this document!
- -
- - .ti -.5i
- etc: /usr/local/lib/mh
- --- 167,168 ----
- ***************
- *** 172,179 ****
- .ti -.5i
- - mailgroup: off
- - .br
- - If set, \fIinc\fR is made set-group-id to this group name.
- - Some SYS5 systems want this to be set to \*(lqmail\*(rq.
- -
- - .ti -.5i
- mandir: /usr/man
- --- 181,182 ----
- ***************
- *** 200,202 ****
- .br
- ! The location of the \fIchown\fR\0(8) on your system.
- If \fIchown\fR is in your search path,
- --- 203,205 ----
- .br
- ! The location of the \fIchown\fR\|(8) on your system.
- If \fIchown\fR is in your search path,
- ***************
- *** 207,211 ****
- .ti -.5i
- ! editor: prompter
- .br
- ! The default editor for \fIMH\fR.
-
- --- 210,215 ----
- .ti -.5i
- ! cp: cp
- .br
- ! The command to copy files when installing, if not \*(lqcp\*(rq.
- ! (Some sites use \*(lqcp\0\-p\*(rq.)
-
- ***************
- *** 212,213 ****
- --- 216,225 ----
- .ti -.5i
- + ln: ln
- + .br
- + The command to link files together in the source tree, if not \*(lqln\*(rq.
- + If you're using something like \fBlndir\fP to keep
- + your compile tree separate from your source tree,
- + set this to \*(lqln\0\-s\*(rq or \*(lqcp\*(rq.
- +
- + .ti -.5i
- remove: mv \-f
- ***************
- *** 214,218 ****
- .br
- ! How \fIMH\fR should backup existing files when installing a new file.
-
- .ti -.5i
- mts: sendmail
- --- 226,306 ----
- .br
- ! How \fIMH\fR should make backup copies
- ! of existing files when installing new files.
- ! To simply remove the old files, use \*(lqrm\0\-f\*(rq.
-
- + .Uh "Compiler/loader"
- .ti -.5i
- + cc: cc
- + .br
- + The name of your C compiler, if not \*(lqcc\*(rq.
- +
- + .ti -.5i
- + ccoptions: \-O
- + .br
- + Options given directly to \fIcc\fR\|(1).
- + The most common is \*(lq\-M\*(rq if you're running \fIMH\fR on an ALTOS.
- + This defaults to \*(lq\-O\*(rq. If you define this and want to
- + keep \*(lq\-O\*(rq, be sure to include it explicitly.
- + If you're using the \fIGNU\fP C compiler, it should
- + include `\-traditional'. See \*(lqoptions:\*(rq for `\-D' options.
- +
- + .ti -.5i
- + curses: \-lcurses\0\-ltermlib
- + .br
- + This should be the loader option required to load the \fItermcap\fR\|(3)
- + and \fIcurses\fR\|(3) libraries on your system.
- + On SYS5 systems, it probably should be just \*(lq\-lcurses\*(rq.
- + Some sites have reported that both \*(lq\-lcurses\*(rq and
- + \*(lq\-ltermlib\*(rq are necessary.
- +
- + .ti -.5i
- + ldoptions: \-s
- + .br
- + Options given directly to \fIld\fR\|(1) (via \fIcc\fR\|) at the beginning
- + of the command line.
- + Useful for machines which require arguments to tell \fIld\fR to increase the
- + stack space (e.g. the Gould, which uses \*(lq\-m\08\*(rq).
- + Usually, \*(lq\-s\*(rq is a good choice in any event.
- +
- + .ti -.5i
- + ldoptlibs:
- + .br
- + Options given directly to \fIld\fR\|(1) (via \fIcc\fR\|) at the end of the
- + command line.
- + The two most common are:
- + \*(lq\-ldbm\*(rq if you're running MMDF with the \fIdbm\fR package;
- + and, \*(lq\-lndir\*(rq if you are generating \fIMH\fR on a system
- + which does not load the new directory access mechanism by default
- + (e.g., 4.1BSD, SYS5).
- + If you don't have \fIlibndir\fR on your system,
- + the sources are in \fBmiscellany/libndir/\fR.
- +
- + .ti -.5i
- + lex: lex \-nt
- + .br
- + Alternative version of \fIlex\fR. Used in \fBzotnet/tws/\fR.
- +
- + .ti -.5i
- + oldload: off
- + .br
- + This controls how \fIMH\fP will try to process library object files to
- + eliminate local symbols.
- + Support for the ALTOS loader if \*(lqon\*(rq.
- + Support for loaders not handling `\-x\0\-r' correctly if \*(lqnone\*(rq.
- +
- + .ti -.5i
- + ranlib: on
- + .br
- + Support for systems with \fIranlib\fR\|(1).
- + For SYSTEM 5 systems,
- + this should be \*(lqoff\*(rq which tells \fIMH\fR to use \fIlorder\fR and
- + \fItsort\fR instead.
- + Some SYSTEM 5 sites reported that running this isn't always sufficient.
- + If this is the case,
- + then you should edit \fBconf/makefiles/uip\fR to include
- + \fB\&../sbr/libmh.a\fR and \fB../zotnet/libzot.a\fR twice in the LIBES
- + variable.
- +
- + .Uh "Message Transport System"
- + .ti -.5i
- mts: sendmail
- ***************
- *** 223,224 ****
- --- 311,313 ----
- \*(lqsendmail\*(rq to have \fISendMail\fR as the transport system,
- + \*(lqzmailer\*(rq to have \fIZMAILER\fP as the transport system,
- or, \*(lqmh\*(rq to have \fIMH\fR as the transport system.
- ***************
- *** 235,237 ****
- Guide\fR; be sure to set \*(lqservers:\*(rq as described in
- ! \fImh\-tailor\fR\0(8) if you use this option.
-
- --- 324,326 ----
- Guide\fR; be sure to set \*(lqservers:\*(rq as described in
- ! \fImh\-tailor\fR\|(8) if you use this option.
-
- ***************
- *** 238,239 ****
- --- 327,337 ----
- .ti -.5i
- + mf: off
- + .br
- + Support for mail filtering on those systems in which the message transport
- + system isn't integrated with \fIUUCP\fR
- + This option is strictly for an \fIMH\fR system using either \fIMMDF\-I\fR
- + as its transport system or one using \*(lqstand\-alone delivery\*(rq.
- +
- + .Uh "UCI BBoards Facility"
- + .ti -.5i
- bboards: off
- ***************
- *** 246,250 ****
- via the NNTP.
- ! If \*(lqpop\*(rq (formerly \*(lqpopbboards:\ on\*(rq),
- include support for the UCI BBoards facility via the POP3 service;
- ! this setting requires \*(lqpop:\ on\*(rq.
-
- --- 344,348 ----
- via the NNTP.
- ! If \*(lqpop\*(rq (formerly \*(lqpopbboards:\0on\*(rq),
- include support for the UCI BBoards facility via the POP3 service;
- ! this setting requires \*(lqpop:\0on\*(rq.
-
- ***************
- *** 273,283 ****
-
- .ti -.5i
- - mf: off
- - .br
- - Support for mail filtering on those systems in which the message transport
- - system isn't integrated with \fIUUCP\fR
- - This option is strictly for an \fIMH\fR system using either \fIMMDF\-I\fR
- - as its transport system or one using \*(lqstand\-alone delivery\*(rq.
- -
- - .ti -.5i
- pop: off
- --- 371,374 ----
-
- + .Uh "Post Office Protocol"
- .ti -.5i
- pop: off
- ***************
- *** 290,305 ****
- (It doesn't hurt to enable this option regardless of whether or not
- ! you intend to use POP.)
- ! If POP is enabled, there are three additional options which are of interest:
- ! \*(lqRPOP\*(rq, \*(lqDPOP\*(rq and \*(lqPOP2\*(rq.
- ! The first indicates that support for the UNIX variant of POP,
- ! RPOP, which uses privileged sockets for authentication be enabled.
- ! This peacefully co\-exists with the standard POP.
- ! The \*(lqDPOP\*(rq option indicates that POP subscribers do not have
- ! entries in the \fIpasswd\fR\0(5) file,
- ! and instead have their own separate database (another major win).
- ! The \*(lqPOP2\*(rq option indicates that the \fIMH\fP POP daemon should
- ! speak the older POP2 protocol in addition to the \fIMH\fP POP3 protocol \-
- ! a major win.
- ! All of these options can be enabled via an \*(lqoptions\*(rq directive in the
- ! \fIMH\fR configuration file.
-
- --- 381,384 ----
- (It doesn't hurt to enable this option regardless of whether or not
- ! you intend to use POP.) See also \*(lqbboards: pop\*(rq to enable
- ! reading bboards with the POP.
-
- ***************
- *** 306,307 ****
- --- 385,392 ----
- .ti -.5i
- + popdir: /usr/etc
- + .br
- + The directory where the POP daemon (\fBpopd\fP) will be installed.
- +
- + .ne 5
- + .ti -.5i
- options:
- ***************
- *** 308,324 ****
- .br
- ! \&`\-D' options to \fIcc\fR\0(1). If you don't know what an
- ! option does, it probably doesn't apply to you.
-
- .in +.5i
- .ti -.5i
- ! ALTOS
- .br
- ! Use on XENIX/v7 systems.
- ! Also, be sure to use \*(lqoptions V7\*(rq.
-
- .ti -.5i
- ! ATHENA
- .br
- ! Makes \fIrepl\fR `\-nocc\ all' the default instead of `\-cc\ all'.
- ! You may want to enable this if you're using \fIxmh\fR.
-
- --- 393,576 ----
- .br
- ! \&`\-D' options to \fIcc\fR\|(1).
- ! .sp
- ! .in +.25i
- ! .ti -.5i
- ! APOP='\*(lq/etc/pop.auth\*(rq'
- ! .br
- ! This option indicates that the POP daemon will
- ! support the non-standard \fBAPOP\fP command,
- ! and specifies the name of \fBAPOP\fP authorization database.
- ! The \fBAPOP\fP
- ! command provides a challenge-based authentication system using
- ! the \fBMD5\fP message digest algorithm.
- ! This facility is documented in
- ! \fIThe Internet Message\fR (ISBN 0\-13\-092941\-7), a book by Marshall T. Rose.
- ! .sp
- ! This option also causes the
- ! \fBpopauth\fP program to be installed, which
- ! allows the administrator to manipulate the \fBAPOP\fP
- ! authorization database.
- ! For more details, see \fBsupport/pop/pop-more.txt\fR
- ! and the \fIAdministrator's Guide\fP.
-
- + .ti -.5i
- + DPOP
- + .br
- + This option indicates that POP subscribers do not have
- + entries in the \fIpasswd\fR\|(5) file,
- + and instead have their own separate database (a win).
- +
- + .ti -.5i
- + KPOP
- + .br
- + Support for KERBEROS with POP.
- + This code builds
- + \fIpopd\fP, \fIinc\fP and \fImsgchk\fP to support only the
- + \*(lqkpop\*(rq protocol.
- + This code is still experimental, but is available for
- + those sites wishing to test it.
- +
- + .ti -.5i
- + MPOP
- + .br
- + This option indicates that the POP daemon will
- + support the non-standard
- + \fBXTND SCAN\fP command which provides performance
- + enhancements when using the POP over low-speed connections.
- + This option also causes an interactive POP
- + client program, \fBpopi\fP, to be compiled and installed.
- + A man page for the \fBpopi\fP program is also provided.
- + .sp
- + These extensions are described in
- + \fIThe Internet Message\fR, a book by Marshall T. Rose.
- + For more details, see \fBsupport/pop/pop-more.txt\fR.
- + \fBNote:\fP this option requires \*(lqbboards: pop\*(rq.
- +
- + .ti -.5i
- + POP2
- + .br
- + Have the POP daemon understand the older
- + POP2 protocol as well as the \fIMH\fP POP3 protocol \- a major win.
- + The POP daemon auto-magically
- + determines which POP protocol your client is using.
- + If you're enabling POP service,
- + there's no reason not to enable this option as well.
- + See also \fIPOPSERVICE\fR.
- +
- + .ti -.5i
- + POPSERVICE
- + .br
- + The port name the \fIMH\fP POP will use. For historical reasons,
- + this defaults to \*(lqpop\*(rq.
- + .sp
- + In 1987, the \fIMH\fP POP protocol
- + (POP version 3) was published as RFC1081 and
- + was assigned its own port number (110),
- + which differs from the original POP (version 1 and 2) port number (109).
- + .sp
- + To have \fIMH\fP POP use the new assigned port number,
- + set POPSERVICE='\*(lqpop3\*(rq', and be sure that this service
- + name is listed in your \fB/etc/services\fP file on both POP client
- + and server hosts as \*(lq110/tcp\*(rq.
- + If you enable \fIPOP2\fP, you can safely leave \fIPOPSERVICE\fP
- + undefined unless you are using POP3 clients besides \fIMH\fP.
- +
- + .ti -.5i
- + RPOP
- + .br
- + This option indicates that support for the UNIX variant of POP,
- + RPOP, which uses privileged sockets for authentication be enabled.
- + This peacefully co-exists with the standard POP.
- +
- + .ti -.5i
- + SHADOW
- + .br
- + Indicates that the \fBpopd\fP POP server
- + can find encrypted passwords in the
- + \fB/etc/shadow\fR file (and not in the \fB/etc/passwd\fR file).
- + It should be used only for some (newer) SYSTEM 5 systems.
- + .in -.25i
- +
- + The \*(lqAPOP\*(rq and \*(lqMPOP\*(rq non-standard POP
- + facilities are documented in
- + \fIThe Internet Message\fR (ISBN 0\-13\-092941\-7),
- + a book by Marshall T. Rose.
- + For more details, see \fBsupport/pop/pop-more.txt\fR.
- + The \*(lqAPOP\*(rq option peacefully co-exists with the standard POP.
- + The \*(lqMPOP\*(rq option requires \*(lqbboards: pop\*(rq.
- +
- + .Uh "Shared libraries"
- + .ti -.5i
- + sharedlib: off
- + .br
- + If \*(lqsun4\*(rq,
- + makes libmh.a into a SunOS 4.0 (and later) shared library.
- + If you enable this, be sure to also use \*(lqoptions SUN40\*(rq.
- + If \*(lqsys5\*(rq,
- + makes libmh.a into a SYS5 R4 (and later) shared library.
- + If you enable this, be sure to also use \*(lqoptions SVR4\*(rq.
- +
- + .ti -.5i
- + slflags: \-pic
- + .br
- + The compiler flags to produce position independent code.
- +
- + .ti -.5i
- + slibdir: /usr/local/lib
- + .br
- + The directory where the \fIMH\fP shared library should go.
- +
- + .ne 4
- + .ti -.25i
- + Under SunOS (sun4)
- + .br
- + Since some \fIMH\fP programs are setuid, they'll only look for
- + the library in \*(lqtrusted\*(rq locations. Putting the library
- + somewhere besides \fB/usr/lib\fP or \fB/usr/local/lib\fP is not advisable.
- +
- + If you \fBmust\fP do this, be sure that you add the
- + path given by \fBslibdir\fP to the compiler's library search list
- + (e.g., \*(lqldoptions:\0\-L/usr/mh/lib\*(rq)
- + and make sure the path starts with a leading `/'.
- +
- + You may need to run \fIldconfig\fP\|(8) manually whenever a new
- + shared object is installed on the system.
- + See \fIld\fR\|(1) for more information about using shared libraries.
- +
- + .ti -.25i
- + Under Solaris 2.0 (and newer)
- + .br
- + The above instructions for SunOS apply, except you should set
- + the run-time library search path using `\-R' instead of `\-L'
- + (e.g., \*(lqldoptions: \-R/usr/mh/lib\*(rq).
- +
- + .Uh "General System Dependencies"
- + .in -.5i
- + You should include the following directives
- + which are appropriate for your version of UNIX.
- + If you don't know what an
- + option does, it probably doesn't apply to you.
- .in +.5i
- +
- .ti -.5i
- ! mailgroup: off
- .br
- ! If set, \fIinc\fR is made set-group-id to this group name.
- ! Some SYS5 systems want this to be set to \*(lqmail\*(rq.
- ! Set this if your \fB/usr/spool/mail\fP is not world-writeable.
-
- + Note that \fBslocal\fP doesn't know how to deal with this,
- + and will not work under these systems; just making it set-group-id
- + will open a security hole.
- + If you're using \*(lqmailgroup\*(rq,
- + you should remove \fBslocal\fP (and its man page) from your system.
- +
- .ti -.5i
- ! signal: int
- .br
- ! The base type (int or void) of the function
- ! parameter/return value of \fIsignal\fR\|(2).
- ! The default is \fBint\fR.
- ! Set \*(lqsignal void\*(rq on systems which use this type
- ! (e.g., SYSTEM 5 V3.0 and later or Sun OS 4.0 and later).
-
- ***************
- *** 325,326 ****
- --- 577,599 ----
- .ti -.5i
- + sprintf: char *
- + .br
- + The return value of the \fIsprintf\fR library routine.
- + This defaults to \*(lqchar\0*\*(rq. Set this to \*(lqint\*(rq if
- + you have an older version of SYSTEM 5 which has this routine return an
- + \*(lqint\*(rq type.
- +
- + .ne 5
- + .ti -.5i
- + options:
- + .br
- + \&`\-D' options to \fIcc\fR\|(1).
- + .sp
- + .in +.25i
- + .ti -.5i
- + ALTOS
- + .br
- + Use on XENIX/v7 systems.
- + Also, be sure to use \*(lqoptions V7\*(rq.
- +
- + .ti -.5i
- ATTVIBUG
- ***************
- *** 339,343 ****
- .ti -.5i
- ! ATZ
- .br
- ! Directs \fIMH\fR to use alpha\-timezones whenever possible.
-
- --- 612,616 ----
- .ti -.5i
- ! AUX
- .br
- ! Use with AUX systems.
-
- ***************
- *** 344,359 ****
- .ti -.5i
- - BANG
- - .br
- - Directs \fIMH\fR to favor `!' over `@' in addressing.
- -
- - .ti -.5i
- - BERK
- - .br
- - Optional for for 4.{2,3}BSD sites running SendMail.
- - Disables nearly all of the RFC822 address and header-parsing routines
- - in favor of recognizing such formats as ASCnet, and so on.
- - If you don't need to disable the parser for this reason,
- - you probably want to use \*(lqoptions DUMB\*(rq instead.
- -
- - .ti -.5i
- BIND
- --- 617,618 ----
- ***************
- *** 379,383 ****
- Also, be sure to use \*(lqoptions BSD42\*(rq.
- ! If \fIopenlog\fR\0(3) (see \*(lqman 3 syslog\*(rq)
- takes three arguments instead of two,
- ! and your \fIwrite\fR\0(1) command is set\-group\-id
- to group \*(lqtty\*(rq, use this option.
- --- 638,642 ----
- Also, be sure to use \*(lqoptions BSD42\*(rq.
- ! If \fIopenlog\fR\|(3) (see \*(lqman 3 syslog\*(rq)
- takes three arguments instead of two,
- ! and your \fIwrite\fR\|(1) command is set\-group\-id
- to group \*(lqtty\*(rq, use this option.
- ***************
- *** 386,392 ****
- .ti -.5i
- ! COMPAT
- .br
- ! If you previously ran a version of \fIMH\fR earlier than mh.4 use this option.
- ! After a short grace period,
- ! remove it and re-{configure,generate,install} everything.
-
- --- 645,650 ----
- .ti -.5i
- ! BSD44
- .br
- ! Use on Berkeley UNIX systems on or after 4.4BSD.
- ! This code is still under development.
-
- ***************
- *** 393,397 ****
- .ti -.5i
- ! DBM
- .br
- ! Use this option if your \fIgetpwent\fR\0(3) routines read a
- dbm database (such as with Yellow Pages) instead of doing
- --- 651,655 ----
- .ti -.5i
- ! DBMPWD
- .br
- ! Use this option if your \fIgetpwent\fR\|(3) routines read a
- dbm database (such as with Yellow Pages) instead of doing
- ***************
- *** 398,400 ****
- a sequential read of \fB/etc/passwd\fR.
- ! Without DBM the entire passwd file is read into
- memory one entry at a time for alias expansion.
- --- 656,658 ----
- a sequential read of \fB/etc/passwd\fR.
- ! Without DBMPWD the entire passwd file is read into
- memory one entry at a time for alias expansion.
- ***************
- *** 407,411 ****
- .ti -.5i
- ! DPOP
- .br
- ! Enables the POP database, useful only if POP service is enabled.
-
- --- 665,671 ----
- .ti -.5i
- ! FCNTL
- .br
- ! Directs \fIMH\fP to use the \fBfcntl()\fP system call for kernel-level
- ! locking. If you're using a SYS5 system, you may want
- ! this option. (See also `FLOCK' and `LOCKF').
-
- ***************
- *** 412,417 ****
- .ti -.5i
- ! DUMB
- .br
- ! Directs \fIMH\fR not to try and rewrite addresses to their
- ! \*(lqofficial\*(rq form.
-
- --- 672,679 ----
- .ti -.5i
- ! FLOCK
- .br
- ! Directs \fIMH\fP to use the \fBflock()\fP system call for kernel-level
- ! locking. If you're on a BSD42 system,
- ! and you're not using NFS to read or write maildrops,
- ! you should enable this option. (See also `FCNTL' and `LOCKF').
-
- ***************
- *** 418,424 ****
- .ti -.5i
- ! FOLDPROT
- .br
- ! Defines the octal value for default folder-protection.
- ! For example, FOLDPROT='\*(lq0700\*(rq'.
- ! The default is \*(lq0711\*(rq.
-
- --- 680,685 ----
- .ti -.5i
- ! HESIOD
- .br
- ! Support for HESIOD.
- ! This code was contributed, and included no documentation.
-
- ***************
- *** 425,440 ****
- .ti -.5i
- - ISI
- - .br
- - When using \*(lqrepl\ \-ccme\*(rq,
- - only \*(lqcc:\*(rq the first address found which belongs to the user;
- - any other \fIAlternate-Mailboxes\fR do not receive \*(lqcc:\*(rqs.
- -
- - .ti -.5i
- - LINK
- - .br
- - Defines the filename for alternate file name for \fIdist\fR and \fIrepl\fR.
- - For example, LINK='\*(lq\\\\043\*(rq' to use the pound\-sign character.
- - The default is \*(lq@\*(rq.
- -
- - .ti -.5i
- LOCKF
- --- 686,687 ----
- ***************
- *** 441,445 ****
- .br
- ! Directs \fIMH\fP to use the \fBlockf()\fP system call for UNIX-style
- ! locking instead of \fBflock()\fP. If you're using NFS to read or
- ! write maildrops, you should enable this option.
-
- --- 688,693 ----
- .br
- ! Directs \fIMH\fP to use the \fBlockf()\fP system call for kernel-level
- ! locking. If you're using NFS to read or
- ! write maildrops, you should enable this option. (See also `FLOCK'
- ! and `FCNTL').
-
- ***************
- *** 448,450 ****
- .br
- ! Hard\-wires the local name for the host \fIMH\fR is running on.
- For example, locname='\*(lqPICKLE\*(rq'.
- --- 696,698 ----
- .br
- ! Hard-wires the local name for the host \fIMH\fR is running on.
- For example, locname='\*(lqPICKLE\*(rq'.
- ***************
- *** 454,467 ****
- .ti -.5i
- - MHE
- - .br
- - Enables crude support for Brien Reid's MHE interface.
- - Recommended for use with the GNU Emacs mh-e package.
- -
- - .ti -.5i
- - MHRC
- - .br
- - Enables \fIMH\fR to recognize the \fICShell\fR's `~'\-construct.
- - This is useful for sites that run with a ~/.mhrc for their users.
- -
- - .ti -.5i
- MORE
- --- 702,703 ----
- ***************
- *** 468,471 ****
- .br
- ! Defines the location of the \fImore\fR\0(1) program.
- ! For example, on ALTOS and DUAL systems,
- MORE='\*(lq/usr/bin/more\*(rq'.
- --- 704,707 ----
- .br
- ! Defines the location of the \fImore\fR\|(1) program.
- ! On ALTOS and DUAL systems, set
- MORE='\*(lq/usr/bin/more\*(rq'.
- ***************
- *** 474,482 ****
- .ti -.5i
- - MSGPROT
- - .br
- - Defines the octal value for default folder-protection
- - For example, MSGPROT='\*(lq0600\*(rq'.
- - The default is \*(lq0644\*(rq.
- -
- - .ti -.5i
- NDIR
- --- 710,711 ----
- ***************
- *** 486,488 ****
- in \fB<ndir.h>\fR if this option is given.
- ! Otherwise, \fIMH\fR will try \fB<ndir.h>\fR.
- If you still can't get this to work on your system,
- --- 715,717 ----
- in \fB<ndir.h>\fR if this option is given.
- ! Otherwise, \fIMH\fR will try \fB<dir.h>\fR.
- If you still can't get this to work on your system,
- ***************
- *** 489,490 ****
- --- 718,720 ----
- edit \fBh/local.h\fR as appropriate.
- + (See also `SYS5DIR'.)
-
- ***************
- *** 495,497 ****
- If you get an undefined symbol \*(lqruserpass\*(rq when compiling
- ! \fIMH\fP, you need this option.
-
- --- 725,729 ----
- If you get an undefined symbol \*(lqruserpass\*(rq when compiling
- ! \fIMH\fP, you need this option. If, however, you include this
- ! option and get an undefined symbol \*(lq\(ru\^\(ruruserpass\*(rq
- ! when compiling, then you should omit this option.
-
- ***************
- *** 504,510 ****
- .ti -.5i
- - NOMHSEQ
- - .br
- - Directs \fIMH\fR to make private sequences the default.
- -
- - .ti -.5i
- NTOHLSWAP
- --- 736,737 ----
- ***************
- *** 519,524 ****
- .ti -.5i
- ! OVERHEAD
- .br
- ! Enable \fIMH\fR commands to read profile/context from open fd:s
- ! without doing an open(); see mh-profile(5) for the details.
-
- --- 746,751 ----
- .ti -.5i
- ! RENAME
- .br
- ! Include this option if your system has a \fBrename()\fP library
- ! call. This is true on BSD42 and newer and some SYS5 systems.
-
- ***************
- *** 525,570 ****
- .ti -.5i
- - POP2
- - .br
- - Have the POP daemon understand the older
- - POP2 protocol as well as the \fIMH\fP POP3 protocol \- a major win.
- - The POP daemon auto-magically
- - determines which POP protocol your client is using.
- - If you're enabling POP service,
- - there's no reason not to enable this option as well.
- - See also \fIPOPSERVICE\fR.
- -
- - .ti -.5i
- - POPSERVICE
- - .br
- - The port name the \fIMH\fP POP will use. For historical reasons,
- - this defaults to \*(lqpop\*(rq.
- - In 1987, the \fIMH\fP POP protocol
- - (POP version 3) was published as RFC1081 and
- - was assigned its own port number (110),
- - which differs from the original POP (version 1 and 2) port number (109).
- - To have \fIMH\fP POP use the new assigned port number,
- - set POPSERVICE='\*(lqpop3\*(rq', and be sure that this service
- - name is listed in your \fB/etc/services\fP file on both POP client
- - and server hosts as \*(lq110/tcp\*(rq.
- - If you enable \fIPOP2\fP, you can safely leave this undefined unless
- - you are using POP3 clients besides \fIMH\fP.
- -
- - .ti -.5i
- - RPATHS
- - .br
- - Directs \fIinc\fR to note UNIX \*(lqFrom\ \*(rq lines as Return-Path: info.
- -
- - .ti -.5i
- - RPOP
- - .br
- - Enables the RPOP variant of POP, useful only if POP service is enabled.
- -
- - .ti -.5i
- - SBACKUP
- - .br
- - Defines the prefix string for backup file names.
- - For example, SBACKUP='\*(lq\\\\043\*(rq'.
- - The default is \*(lq,\*(rq.
- -
- - .ti -.5i
- SENDMAILBUG
- --- 752,753 ----
- ***************
- *** 573,575 ****
- to be considered the same as code 250 (OK).
- ! Enable this if you know that your SendMail will
- return this code even when it doesn't mean to indicate a failure.
- --- 756,759 ----
- to be considered the same as code 250 (OK).
- ! Since this might cause problems, only
- ! enable this if you are certain that your SendMail will
- return this code even when it doesn't mean to indicate a failure.
- ***************
- *** 577,585 ****
- .ti -.5i
- - SHADOW
- - .br
- - Indicates that the encrypted passwords can be found in the
- - \fB/etc/shadow\fR file (and not in the \fB/etc/passwd\fR file).
- - This option should only be used for some (newer) SYSTEM 5 systems.
- -
- - .ti -.5i
- SOCKETS
- --- 761,762 ----
- ***************
- *** 594,606 ****
- .br
- ! Use on Sun OS 4.0 (and later?) systems. You probably also want
- \*(lqoptions BSD42\*(rq, \*(lqoptions BSD43\*(rq, and
- ! \*(lqoptions TYPESIG=void\*(rq.
-
- ! .ti -.5i
- ! SUN41
- ! .br
- ! Use on Sun OS 4.1 (and later?) systems. You also want
- ! \*(lqoptions SUN40\*(rq,
- ! \*(lqoptions BSD42\*(rq, \*(lqoptions BSD43\*(rq, and
- ! \*(lqoptions TYPESIG=void\*(rq.
-
- --- 771,780 ----
- .br
- ! Use on Sun OS 4.0 (and later?) systems. You also will need
- \*(lqoptions BSD42\*(rq, \*(lqoptions BSD43\*(rq, and
- ! \*(lqsignal void\*(rq.
-
- ! If you're using Sun's brain-damaged approach to offering Domain
- ! Name Service through NIS, be sure to include
- ! \*(lqoptions BIND\*(rq and
- ! \*(lqldoptions \-lresolv\*(rq to work around some NIS/DNS bugs.
-
- ***************
- *** 621,625 ****
- .ti -.5i
- ! TTYD
- .br
- ! Support for TTYD. This is no longer in wide use, and is not recommended.
-
- --- 795,803 ----
- .ti -.5i
- ! SVR4
- .br
- ! Use on AT&T SYSTEM 5 R4 (and newer?) UNIX systems. You should
- ! also include \*(lqoptions SYS5\*(rq and \*(lqoptions SYS5DIR\*(rq.
- ! See also \fImailgroup\fR.
- ! You will also need to include \*(lqoldload none\*(rq if your \fBld\fP
- ! doesn't handle `\-x\0\-r' correctly.
-
- ***************
- *** 626,634 ****
- .ti -.5i
- ! TYPESIG
- .br
- ! Defines the base type (int or void) of the functions
- ! being parameter/return value of \fIsignal\fR\0(2).
- ! The default is \fBint\fR.
- ! Set TYPESIG='void' on systems which use this type
- ! (e.g., SYSTEM 5 V3.0 and later or Sun OS 4.0 and later).
-
- --- 804,810 ----
- .ti -.5i
- ! TERMINFO
- .br
- ! Define TERMINFO if you have it.
- ! You get it automatically if you're running SYS5, and you don't get
- ! it if you're not. (If you're not SYS5, you probably have termcap.)
-
- ***************
- *** 642,654 ****
- .ti -.5i
- ! UCI
- .br
- ! First, \*(lq_\*(rq and \*(lq#\*(rq are recognized as the prefixes for
- ! scratch files.
- ! Second, support for the UCI group\-leadership mechanism is enabled in
- ! \fIconflict\fR.
- ! Third, the file \fB$HOME/.signature\fR is considered to contain
- ! a single line of text which is used as the \fIFull Name\fR part
- ! of your \*(lqFrom:\*(rq header.
- ! This may conflict with the interpretation of this file by \fINews\fR.
- ! If you're not at UCI, you probably don't want this option.
-
- --- 818,823 ----
- .ti -.5i
- ! UNISTD
- .br
- ! Include this option if your system has the file \fB<unistd.h>\fP.
- ! If not specified, the LOCKF option will include \fB<sys/fcntl.h>\fP.
-
- ***************
- *** 655,661 ****
- .ti -.5i
- - UK
- - .br
- - Directs the \fIscan\fR program to generate UK-style dates.
- -
- - .ti -.5i
- V7
- --- 824,825 ----
- ***************
- *** 666,671 ****
- .ti -.5i
- ! WP
- .br
- ! Enables the White Pages service.
- ! Contact wpp-manager@psi.com for more information.
-
- --- 830,835 ----
- .ti -.5i
- ! VSPRINTF
- .br
- ! Include this option if your system has the \fIvsprintf\fP\|(3)
- ! library routine; otherwise, \fI\(rudoprnt\fP\|(3) will be used.
-
- ***************
- *** 672,676 ****
- .ti -.5i
- ! WHATNOW
- .br
- ! Enable certain \fIMH\fR commands to act differently when $mhdraft set.
-
- --- 836,845 ----
- .ti -.5i
- ! WAITINT
- .br
- ! BSD42 based systems call the \fIwait\fP\|(2)
- ! system routine with a pointer to type \fIunion wait\fP.
- ! Include this option if you included \*(lqoptions BSD42\*(rq, but
- ! your system calls the \fIwait\fP\|(2)
- ! system routine with a pointer to type \fIint\fP
- ! (the non-BSD42 default).
-
- ***************
- *** 680,682 ****
- Specify this if you have a BSD43 based system that keeps time zone
- ! information /etc/zoneinfo or /usr/lib/zoneinfo (SunOS).
- With this fix the GMT offset specified in outgoing mail
- --- 849,855 ----
- Specify this if you have a BSD43 based system that keeps time zone
- ! information /etc/zoneinfo or /usr/lib/zoneinfo (SunOS),
- ! and where
- ! the \fIstruct tm\fP
- ! returned by \fIlocaltime\fP\|(3) contains a \fItm_gmtoff\fP element
- ! (see \fB/usr/include/time.h\fP).
- With this fix the GMT offset specified in outgoing mail
- ***************
- *** 684,686 ****
- --- 857,868 ----
- to a different time zone. See also TZNAME.
- + .in -.25i
- +
- + .Uh "Site Preferences"
- + .br
- .in -.5i
- + These options change the
- + default behavior of \fIMH\fP or enable optional features.
- + Add the options which are appropriate for your configuration
- + or your site preferences.
- + .in +.5i
-
- ***************
- *** 687,699 ****
- .ti -.5i
- ! cc:
- .br
- ! The name of your C compiler, if not \*(lqcc\*(rq.
-
- .ti -.5i
- ! ccoptions: \-O
- .br
- ! Options given directly to \fIcc\fR\0(1).
- ! The most common is \*(lq\-M\*(rq if you're running \fIMH\fR on an ALTOS.
- ! This defaults to \*(lq\-O\*(rq. If you define this and want to
- ! keep \*(lq\-O\*(rq, be sure to include it explicitly.
-
- --- 869,889 ----
- .ti -.5i
- ! editor: prompter
- .br
- ! The default editor for \fIMH\fR.
-
- + .ne 5
- .ti -.5i
- ! options:
- .br
- ! \&`\-D' options to \fIcc\fR\|(1).
- ! .sp
- ! .in +.25i
- ! .ne 4
- ! .ti -.5i
- ! ATZ
- ! .br
- ! Directs \fIMH\fR to use alpha\-timezones whenever possible.
- ! You should not use this option if you are on the Internet,
- ! since it will make your host non-compliant with RFC-1123
- ! (Requirements for Internet Hosts).
-
- ***************
- *** 700,708 ****
- .ti -.5i
- ! curses: \-lcurses\0\-ltermlib
- .br
- ! This should be the loader option required to load the \fItermcap\fR\0(3)
- ! and \fIcurses\fR\0(3) libraries on your system.
- ! On SYS5 systems, it probably should be just \*(lq\-lcurses\*(rq.
- ! Some sites have reported that both \*(lq\-lcurses\*(rq and
- ! \*(lq\-ltermlib\*(rq are necessary.
-
- --- 890,895 ----
- .ti -.5i
- ! ATHENA
- .br
- ! Makes \fIrepl\fR `\-nocc\0all' the default instead of `\-cc\0all'.
- ! You may want to enable this if you're using \fIxmh\fR.
-
- ***************
- *** 709,717 ****
- .ti -.5i
- ! ldoptions:
- .br
- ! Options given directly to \fIld\fR\0(1) (via \fIcc\fR\0) at the beginning
- ! of the command line.
- ! Useful for machines which require arguments to tell \fIld\fR to increase the
- ! stack space (e.g. the Gould, which uses \*(lq\-m\08\*(rq).
- ! Usually, \*(lq\-s\*(rq is a good choice in any event.
-
- --- 896,900 ----
- .ti -.5i
- ! BANG
- .br
- ! Directs \fIMH\fR to favor `!' over `@' in addressing.
-
- ***************
- *** 718,730 ****
- .ti -.5i
- ! ldoptlibs:
- .br
- ! Options given directly to \fIld\fR\0(1) (via \fIcc\fR\0) at the end of the
- ! command line.
- ! The two most common are:
- ! \*(lq\-ldbm\*(rq if you're running MMDF with the \fIdbm\fR package;
- ! and, \*(lq\-lndir\*(rq if you are generating \fIMH\fR on a system
- ! which does not load the new directory access mechanism by default
- ! (e.g., 4.1BSD, SYS5).
- ! If you don't have \fIlibndir\fR on your system,
- ! the sources are in \fBmiscellany/libndir/\fR.
-
- --- 901,909 ----
- .ti -.5i
- ! BERK
- .br
- ! Optional for for 4.{2,3}BSD sites running SendMail.
- ! Disables nearly all of the RFC822 address and header-parsing routines
- ! in favor of recognizing such formats as ASCnet, and so on.
- ! If you don't need to disable the parser for this reason,
- ! you probably want to use \*(lqoptions DUMB\*(rq instead.
-
- ***************
- *** 731,735 ****
- .ti -.5i
- ! lex: lex -nt
- .br
- ! Alternative version of \fIlex\fR. Used in \fBzotnet/tws/\fR.
-
- --- 910,916 ----
- .ti -.5i
- ! COMPAT
- .br
- ! If you previously ran a version of \fIMH\fR earlier than mh.4 use this option.
- ! After a short grace period,
- ! remove it and re-{configure,generate,install} everything.
-
- ***************
- *** 736,743 ****
- .ti -.5i
- ! sprintf: int
- .br
- ! The return value of the \fIsprintf\fR library routine.
- ! This defaults to \*(lqchar\ *\*(rq. Set this to \*(lqint\*(rq if
- ! you have an older version of SYSTEM 5 which has this routine return an
- ! \*(lqint\*(rq type.
-
- --- 917,922 ----
- .ti -.5i
- ! DUMB
- .br
- ! Directs \fIMH\fR not to try and rewrite addresses to their
- ! \*(lqofficial\*(rq form.
-
- ***************
- *** 744,749 ****
- .ti -.5i
- ! sharedlib: off
- .br
- ! Makes libmh.a into a shared library (only for SunOS 4.0 and later).
- ! If you enable this, be sure to use \*(lqoptions SUN40\*(rq.
-
- --- 923,929 ----
- .ti -.5i
- ! FOLDPROT
- .br
- ! Defines the octal value for default folder-protection.
- ! For example, FOLDPROT='\^\*(lq0700\*(rq\^'.
- ! The default is \*(lq0711\*(rq.
-
- ***************
- *** 750,762 ****
- .ti -.5i
- ! slibdir: /usr/local/lib
- .br
- ! The directory where the \fIMH\fP shared library should go.
-
- ! Since some \fIMH\fP programs are setuid, they'll only look for
- ! the library in \*(lqtrusted\*(rq locations. Putting the library
- ! somewhere besides \fB/usr/lib\fP or \fB/usr/local/lib\fP is not advisable.
-
- ! You may need to run \fIldconfig\fP\0(8) manually whenever a new
- ! shared object is installed on the system.
- ! See \fIld\fR\0(1) for more information about using shared libraries.
-
- --- 930,950 ----
- .ti -.5i
- ! ISI
- .br
- ! When using \*(lqrepl\0\-ccme\*(rq,
- ! only \*(lqcc:\*(rq the first address found which belongs to the user;
- ! any other \fIAlternate-Mailboxes\fR do not receive \*(lqcc:\*(rqs.
-
- ! .ti -.5i
- ! LINK
- ! .br
- ! Defines the filename for alternate file name for \fIdist\fR and \fIrepl\fR.
- ! For example, LINK='\^\*(lq\^\\\^\\\^043\*(rq\^'
- ! to use the pound\-sign character.
- ! The default is \*(lq@\*(rq.
-
- ! .ti -.5i
- ! MHE
- ! .br
- ! Enables crude support for Brien Reid's MHE interface.
- ! Recommended for use with the GNU Emacs mh-e package.
-
- ***************
- *** 763,768 ****
- .ti -.5i
- ! oldload: off
- .br
- ! Support for the ALTOS loader if \*(lqon\*(rq.
- ! Support for loaders not handling `\-x\0\-r' correctly if \*(lqnone\*(rq.
-
- --- 951,956 ----
- .ti -.5i
- ! MHRC
- .br
- ! Enables \fIMH\fR to recognize the \fICShell\fR's `~'\-construct.
- ! This is useful for sites that run with a ~/.mhrc for their users.
-
- ***************
- *** 769,781 ****
- .ti -.5i
- ! ranlib: on
- .br
- ! Support for systems with \fIranlib\fR\0(1).
- ! For SYSTEM 5 systems,
- ! this should be \*(lqoff\*(rq which tells \fIMH\fR to use \fIlorder\fR and
- ! \fItsort\fR instead.
- ! Some SYSTEM 5 sites reported that running this isn't always sufficient.
- ! If this is the case,
- ! then you should edit \fBconf/makefiles/uip\fR to include
- ! \fB\&../sbr/libmh.a\fR and \fB../zotnet/libzot.a\fR twice in the LIBES
- ! variable.
-
- --- 957,970 ----
- .ti -.5i
- ! MIME
- .br
- ! Enables support for multi-media messages,
- ! as specified in RFC 1341 \-\- a major win.
- ! This allows you to include things like audio,
- ! graphics, and the like, in your mail messages.
- ! Several \fIMH\fP commands are extended to support these multi-media
- ! messages,
- ! and the \fImhn\fR command is provided to encode and decode
- ! \fBMIME\fP messages.
- ! For more details, see \fBmiscellany/multi-media/READ-ME\fP
- ! and \fImhn\fR\|(1).
-
- ***************
- *** 782,785 ****
- .ti -.5i
- ! tma: off
- .br
- Support for the TTI \fItrusted mail agent\fR (TMA).
- --- 971,1014 ----
- .ti -.5i
- ! MSGID
- .br
- + Enables \fBslocal\fP to detect and surpress duplicate messages received.
- + This code uses the \fB<ndbm.h>\fP library,
- + and requires \*(lqoptions BSD42\*(rq since
- + it uses the \fIflock\fP\|(2) system call for locking.
- + (Note that this means its database locking does not work over NFS.)
- + It has only been tested under SUN40.
- +
- + .ti -.5i
- + MSGPROT
- + .br
- + Defines the octal value for default folder-protection.
- + For example, MSGPROT='\^\*(lq0600\*(rq\^'.
- + The default is \*(lq0644\*(rq.
- +
- + .ti -.5i
- + NOMHSEQ
- + .br
- + Directs \fIMH\fR to make private sequences the default.
- +
- + .ti -.5i
- + OVERHEAD
- + .br
- + Enable \fIMH\fR commands to read profile/context from open fd:s
- + without doing an open(); see \fImh-profile\fP\|(5) for the details.
- +
- + .ti -.5i
- + RPATHS
- + .br
- + Directs \fIinc\fR to note UNIX \*(lqFrom\ \*(rq lines as Return-Path: info.
- +
- + .ti -.5i
- + SBACKUP
- + .br
- + Defines the prefix string for backup file names.
- + For example, SBACKUP='\^\*(lq\^\\\^\\\^043\*(rq\^'.
- + The default is \*(lq,\*(rq.
- +
- + .ti -.5i
- + TMA
- + .br
- Support for the TTI \fItrusted mail agent\fR (TMA).
- ***************
- *** 790,791 ****
- --- 1019,1079 ----
- (otherwise, you don't have the software in your \fIMH\fR source tree).
- +
- + .ti -.5i
- + TTYD
- + .br
- + Support for TTYD. This is no longer in wide use, and is not recommended.
- +
- + .ti -.5i
- + UCI
- + .br
- + First, \*(lq_\*(rq and \*(lq#\*(rq are recognized as the prefixes for
- + scratch files.
- + Second, support for the UCI group\-leadership mechanism is enabled in
- + \fIconflict\fR.
- + Third, the first line of the file
- + file \fB$HOME/.signature\fR is used as the \fIFull Name\fR part
- + of your \*(lqFrom:\*(rq header.
- + This may conflict with the interpretation of this file by \fINews\fR.
- + If you're not at UCI, you probably don't want this option.
- +
- + .ti -.5i
- + UK
- + .br
- + Directs the \fIscan\fR program to generate UK-style dates by default.
- +
- + .ti -.5i
- + WHATNOW
- + .br
- + Enable certain \fIMH\fR commands to act differently when $mhdraft set.
- +
- + .ti -.5i
- + YEARMOD
- + .br
- + This option makes the \fImh-format\fP \fB%(year)\fP function
- + always return a value less than 100.
- + Enable this option if you have local \fImh-format\fP\|(5) files
- + which cannot handle 4-digit years.
- + You should convert these files to use a 4-character field width,
- + or use the \fB%(modulo 100)\fP function to obtain a 2-digit year value.
- + After a short grace period,
- + remove `YEARMOD' and re-{configure,generate,install} everything.
- + .in -.25i
- +
- + .Uh "Testing/debugging"
- + .ti -.5i
- + debug: off
- + .br
- + Support for debug mode of \fIMH\fR.
- + Don't use this unless you know what you're doing,
- + which isn't likely if you're reading this document!
- +
- + .ti -.5i
- + regtest: off
- + .br
- + Set this to \*(lqon\*(rq
- + if you are doing regression testing among different
- + compilations of \fIMH\fP, and you do not want the hostname
- + and compile date included in \fIMH\fP binaries.
- +
- + .sp
- .in -.5i
- ***************
- *** 814,815 ****
- --- 1102,1122 ----
- .PP
- + \fBBefore proceeding\fP,
- + you should familiarize yourself with the \fIAdministrator's Guide\fR.
- + To generate an \fInroff\fR version, go to the doc/ directory
- + and type:
- + .sp 1
- + .nf
- + % (cd ../doc/; make ADMIN.doc)
- + .fi
- + .sp
- + .PP
- + If you're already running \fIMH\fR at your site,
- + you should also read the \fImh\fR changes document \fBCHANGES\fP.
- + The source is in \fBpapers/changes/\fR.
- + .PP
- + After reading the \fIAdministrator's Guide\fR, you may decide
- + to change your MH configuration. If so, cd back to the \fBconf/\fP
- + directory, re-edit the file \fBMH\fP, and re-run
- + \fImhconfig\fP.
- + .PP
- You now proceed based on your choice of a transport system
- ***************
- *** 820,823 ****
- .SS SENDMAIL
- ! If you want \fISendMail\fR to transport messages for \fIMH\fR,
- ! then go to the mts/sendmail/ directory.
- .sp 1
- --- 1127,1138 ----
- .SS SENDMAIL
- ! If you have not enabled BBoards or POP
- ! then no further MTS\-specific action is required on your part!
- !
- ! If you have enabled POP, but you
- ! want to let \fISendMail\fP deliver mail POP mail using its
- ! standard delivery program \fB/bin/mail\fP,
- ! then, again, no further MTS\-specific action is required on your part!
- !
- ! Otherwise,
- ! go to the mts/sendmail/ directory.
- .sp 1
- ***************
- *** 970,972 ****
- If you are using \*(lqmmdf2/smtp\*(rq as your mts setting,
- ! then no futher MTS\-specific action is required on your part!
- .SS "STAND\-ALONE DELIVERY"
- --- 1285,1287 ----
- If you are using \*(lqmmdf2/smtp\*(rq as your mts setting,
- ! then no further MTS\-specific action is required on your part!
- .SS "STAND\-ALONE DELIVERY"
- ***************
- *** 973,977 ****
- If, instead, you want \fIMH\fR to handle its own mail delivery,
- ! then no futher MTS\-specific action is required on your part!
- .SH GENERATION
- ! Go to the mh.6/ directory and generate the system.
- .sp 1
- --- 1288,1292 ----
- If, instead, you want \fIMH\fR to handle its own mail delivery,
- ! then no further MTS\-specific action is required on your part!
- .SH GENERATION
- ! Go to the \fIMH\fP top-level directory and generate the system.
- .sp 1
- ***************
- *** 991,1013 ****
- .PP
- - \fBBefore proceeding\fP,
- - you should familiarize yourself with the \fIAdministrator's Guide\fR.
- - To generate an \fInroff\fR version, go to the doc/ directory
- - and type:
- - .sp 1
- - .nf
- - % (cd doc/; make ADMIN.doc)
- - .fi
- - .sp 1
- - To generate a \fItroff\fR version, type
- - .sp 1
- - .nf
- - % (cd doc/; make guide)
- - .fi
- - .sp 1
- - instead.
- - .PP
- - If you're already running \fIMH\fR at your site,
- - you should also read the \fImh.6\fR changes documents.
- - The sources are in \fBpapers/mh6.5/\fR and \fBpapers/mh6.7/\fP.
- - .PP
- Next, if you enabled support for the UCI BBoards facility,
- --- 1306,1307 ----
- ***************
- *** 1055,1057 ****
- The \fBMailAliases\fR, \fBBBoardAliases\fR, \fBmtstailor\fR and \fBBBoards\fR
- ! files will not be installed over existing copies;
- you will need to edit these by
- --- 1349,1351 ----
- The \fBMailAliases\fR, \fBBBoardAliases\fR, \fBmtstailor\fR and \fBBBoards\fR
- ! files will \fBNOT\fP be installed over existing copies;
- you will need to edit these by
- ***************
- *** 1077,1080 ****
- In addition to this document,
- ! the administrator's guide,
- ! and the user's manual,
- there are several documents referenced by the user's manual which may be
- --- 1371,1374 ----
- In addition to this document,
- ! the \fIAdministrator's Guide\fP,
- ! and the \fIUser's Manual\fP,
- there are several documents referenced by the user's manual which may be
- ***************
- *** 1092,1093 ****
- --- 1386,1391 ----
- The \fImhconfig\fR program should be smarter.
- + .PP
- + There's no way to print the \fIAdministrator's Guide\fP
- + until after you have configured the system; it is difficult
- + to configure the system without the \fIAdministrator's Guide\fP.
- .PP
- *** ../mh-6.7.2/conf/mhconfig.c Mon Jan 27 09:34:35 1992
- --- conf/mhconfig.c Wed Dec 2 11:08:07 1992
- ***************
- *** 1,8 ****
- /* mhconfig.c - configure MH */
- /* cc [-DSYS5] mhconfig.c -o mhconfig */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mhconfig.c,v 2.31 1992/01/27 17:34:29 jromine Exp $";
- ! #endif lint
-
- #include <ctype.h>
- #include <stdio.h>
- --- 1,8 ----
- /* mhconfig.c - configure MH */
- /* cc [-DSYS5] mhconfig.c -o mhconfig */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mhconfig.c,v 2.63 1992/12/02 19:08:03 jromine Exp $";
- ! #endif /* lint */
-
- #include <ctype.h>
- #include <stdio.h>
- ***************
- *** 12,18 ****
- #ifdef SYS5
- #define index strchr
- #define rindex strrchr
- ! #endif SYS5
-
- static void insopt(), mkopts();
-
- --- 12,18 ----
- #ifdef SYS5
- #define index strchr
- #define rindex strrchr
- ! #endif /* SYS5 */
-
- static void insopt(), mkopts();
-
- ***************
- *** 29,38 ****
- #define MAKE "../%s/Makefile"
-
- #define WARNING "This file is automatically generated. Do not edit!"
- ! #define MHRELEASE "6.7" /* for version: "Maj.min.pat" */
- ! #define MHCENTERFOOT "MH.6.7" /* for nroff page footers */
- #define MHLEFTFOOT "[mh.6]" /* [mh.6] MH.6.6 page# */
- ! #define MHSLIBVER "1.1" /* SunOS4 shared library version */
-
- #define NOTOK (-1)
-
- --- 29,38 ----
- #define MAKE "../%s/Makefile"
-
- #define WARNING "This file is automatically generated. Do not edit!"
- ! #define MHRELEASE "6.8" /* for version: "Maj.min.pat" */
- ! #define MHCENTERFOOT "MH.6.8" /* for nroff page footers */
- #define MHLEFTFOOT "[mh.6]" /* [mh.6] MH.6.6 page# */
- ! #define MHSLIBVER "3.2" /* SunOS4 shared library version */
-
- #define NOTOK (-1)
-
- ***************
- *** 44,52 ****
-
- /* */
-
- - static int bsd43 = 0;
- static int smtp = 0;
- ! static int uci = 0;
-
- static int sedP = 1;
- static int filesP = 1;
- --- 44,51 ----
-
- /* */
-
- static int smtp = 0;
- ! static int mpop = 0;
-
- static int sedP = 1;
- static int filesP = 1;
- ***************
- *** 64,69 ****
- --- 63,69 ----
- static char *ccoptions = NULL;
- static char *chownpath = "/etc/chown";
- static char *compiler = "/bin/cc";
- + static char *copy = "cp";
- static char *curses = "-lcurses -ltermlib";
- static char *debug = "off";
- static char *editor = "prompter";
- ***************
- *** 71,77 ****
- static char *ldoptions = NULL;
- static char *ldoptlibs = NULL;
- static char *lex = "lex -nt";
- ! static char *mailgroup = NULL;
- static char *mailpath = "/usr/spool/mail";
- static char *maildir = NULL;
- static char *mailfile = NULL;
- --- 71,78 ----
- static char *ldoptions = NULL;
- static char *ldoptlibs = NULL;
- static char *lex = "lex -nt";
- ! static char *ln = "ln";
- ! static char *mailgroup = "off";
- static char *mailpath = "/usr/spool/mail";
- static char *maildir = NULL;
- static char *mailfile = NULL;
- ***************
- *** 79,94 ****
- static char *manuals = "standard";
- static char *mf = "off";
- static char *mts = "sendmail";
- static char *removeit = "mv -f";
- static char *oldload = "off";
- static char *options = NULL;
- static char *pop = "off";
- static char *ranlib = "on";
- static char *sharedlib = "off";
- static char *slibdir = "/usr/local/lib";
- static char *sprntf = NULL;
- - static char *tma = "off";
-
- #define unknown 0
- #define mmdf 1
- #define mmdf2 2
- --- 80,100 ----
- static char *manuals = "standard";
- static char *mf = "off";
- static char *mts = "sendmail";
- + static char *poppath = "/usr/etc";
- static char *removeit = "mv -f";
- + static char *regtest = "off";
- static char *oldload = "off";
- static char *options = NULL;
- static char *pop = "off";
- static char *ranlib = "on";
- static char *sharedlib = "off";
- + static char *signl = "int";
- static char *slibdir = "/usr/local/lib";
- + static char *slflags = "-pic";
- static char *sprntf = NULL;
-
- + /* */
- +
- #define unknown 0
- #define mmdf 1
- #define mmdf2 2
- ***************
- *** 112,120 ****
- --- 118,151 ----
- "mh", "MHMTS", mh, NOFLAGS,
- "sendmail", "SENDMTS", sendmail, NOMF,
- "sendmail/smtp", "SENDMTS SMTP", sendmail, NOMF,
- + "zmailer", "ZMAILER SENDMTS", sendmail, NOMF,
- + "zmailer/smtp", "ZMAILER SENDMTS SMTP", sendmail, NOMF,
- NULL, NULL, unknown, NOFLAGS
- };
-
- + /* other options which cause sed BEGIN/END configuration changes */
- +
- + static struct copt {
- + char *c_name;
- + int c_value;
- + } copts[] = {
- + "APOP", 0, /* authenticated pop */
- + "BSD43", 0, /* sgid ttys */
- + "KPOP", 0, /* KERBEROS pop */
- + "HESIOD", 0,
- + "MIME", 0, /* multi-media extensions */
- + "MPOP", 0, /* mobile pop */
- + "MSGID", 0, /* slocal dup surpression */
- + "TMA", 0, /* trusted mail */
- + "TTYD", 0,
- + "UCI", 0,
- + NULL, 0
- + };
- +
- +
- +
- + /* */
- +
- static struct bind {
- char *keyword;
-
- ***************
- *** 131,136 ****
- --- 162,168 ----
- "ccoptions", &ccoptions, BD_ADD,
- "chown", &chownpath, BD_NIL,
- "cc", &compiler, BD_NIL,
- + "cp", ©, BD_NIL,
- "curses", &curses, BD_NIL,
- "debug", &debug, BD_NIL,
- "editor", &editor, BD_NIL,
- ***************
- *** 138,143 ****
- --- 170,176 ----
- "ldoptions", &ldoptions, BD_ADD,
- "ldoptlibs", &ldoptlibs, BD_ADD,
- "lex", &lex, BD_NIL,
- + "ln", &ln, BD_NIL,
- "mail", &mailpath, BD_NIL,
- "mailgroup", &mailgroup, BD_NIL,
- "mandir", &mandir, BD_NIL,
- ***************
- *** 147,161 ****
- "oldload", &oldload, BD_NIL,
- "options", &options, BD_ADD,
- "pop", &pop, BD_NIL,
- "ranlib", &ranlib, BD_NIL,
- "remove", &removeit, BD_NIL,
- "sharedlib", &sharedlib, BD_NIL,
- "slibdir", &slibdir, BD_NIL,
- "sprintf", &sprntf, BD_NIL,
- - "tma", &tma, BD_NIL,
- NULL
- };
-
-
- char *files[] = {
- "../support/bboards/bboards.daily",
- --- 180,198 ----
- "oldload", &oldload, BD_NIL,
- "options", &options, BD_ADD,
- "pop", &pop, BD_NIL,
- + "popdir", &poppath, BD_NIL,
- "ranlib", &ranlib, BD_NIL,
- "remove", &removeit, BD_NIL,
- + "regtest", ®test, BD_NIL,
- "sharedlib", &sharedlib, BD_NIL,
- + "signal", &signl, BD_NIL,
- + "slflags", &slflags, BD_NIL,
- "slibdir", &slibdir, BD_NIL,
- "sprintf", &sprntf, BD_NIL,
- NULL
- };
-
- + /* */
-
- char *files[] = {
- "../support/bboards/bboards.daily",
- ***************
- *** 230,236 ****
- printf ("Don't forget to edit \"config/mtstailor\"\n");
- #endif
- if (filesP || makeP)
- ! printf ("Don't forget to run \"make clean\" before compiling\n");
-
- exit (0);
- }
- --- 267,273 ----
- printf ("Don't forget to edit \"config/mtstailor\"\n");
- #endif
- if (filesP || makeP)
- ! printf ("Don't forget to run \"make clean\" in the top directory before compiling\n");
-
- exit (0);
- }
- ***************
- *** 255,265 ****
- fprintf (fp, "%s\n%s\n%s\n%s\n",
- "s!^@END: \\(.*\\)$!.br\\",
- ".ti 0i\\",
- ! "#endif \\1\\",
- ".br!"
- );
- }
-
- static do_sedfile (sed, flag)
- char *sed;
- int flag;
- --- 292,304 ----
- fprintf (fp, "%s\n%s\n%s\n%s\n",
- "s!^@END: \\(.*\\)$!.br\\",
- ".ti 0i\\",
- ! "#endif /* \\1\\ */",
- ".br!"
- );
- }
-
- + /* */
- +
- static do_sedfile (sed, flag)
- char *sed;
- int flag;
- ***************
- *** 266,271 ****
- --- 305,311 ----
- {
- int i;
- FILE * fp;
- + struct copt *op;
-
- if ((fp = fopen (sed, "w")) == NULL)
- adios (sed, "unable to write");
- ***************
- *** 284,289 ****
- --- 324,330 ----
- fprintf (fp, "s%%@(MHLEFTFOOT)%%%s%%g\n", MHLEFTFOOT);
- fprintf (fp, "s%%@(MHBINPATH)%%%s%%g\n", SVAL (binpath));
- fprintf (fp, "s%%@(MHETCPATH)%%%s%%g\n", SVAL (etcpath));
- + fprintf (fp, "s%%@(MHPOPDPATH)%%%s%%g\n", SVAL (poppath));
- fprintf (fp, "s%%@(MHCHOWNPATH)%%%s%%g\n", SVAL (chownpath));
- fprintf (fp, "s%%@(MHDROPATH)%%%s%%g\n", SVAL (maildir));
- fprintf (fp, "s%%@(MHDROPFIL)%%%s%%g\n", SVAL (mailfile));
- ***************
- *** 311,317 ****
- : strcmp (manuals, "old") == 0 ? 'o'
- : 'l');
- }
- ! if (strcmp (manuals, "gen") == 0)
- fprintf (fp, "s%%@(MHMANGEN)%%%s%%g\n", "#"); /* comment char */
- else
- fprintf (fp, "s%%@(MHMANGEN)%%%s%%g\n", "");
- --- 352,366 ----
- : strcmp (manuals, "old") == 0 ? 'o'
- : 'l');
- }
- !
- ! /* */
- !
- ! if (strcmp (regtest, "on") == 0)
- ! fprintf (fp, "s%%@(MHHOSTVER)%%%s%%g\n", "-n");
- ! else
- ! fprintf (fp, "s%%@(MHHOSTVER)%%%s%%g\n", "");
- !
- ! if (strcmp (manuals, "gen") == 0 || strcmp (manuals, "gen") == 0)
- fprintf (fp, "s%%@(MHMANGEN)%%%s%%g\n", "#"); /* comment char */
- else
- fprintf (fp, "s%%@(MHMANGEN)%%%s%%g\n", "");
- ***************
- *** 319,324 ****
- --- 368,375 ----
- fprintf (fp, "s%%@(MHEDITOR)%%%s%%g\n", SVAL (editor));
- fprintf (fp, "s%%@(MHCONFIG)%%%s%%g\n", SVAL (myopts));
- fprintf (fp, "s%%@(MHCOMPILER)%%%s%%g\n", SVAL (compiler));
- + fprintf (fp, "s%%@(CP)%%%s%%g\n", SVAL (copy));
- + fprintf (fp, "s%%@(LN)%%%s%%g\n", SVAL (ln));
- fprintf (fp, "s%%@(LEX)%%%s%%g\n", SVAL (lex));
- if (ccoptions)
- fprintf (fp, "s%%@(MHOPTIONS)%%%s %s%%g\n",
- ***************
- *** 349,355 ****
- fprintf (fp, "/^@BEGIN: OPTIM$/d\n/^@END: OPTIM$/d\n");
- }
-
- ! if (mailgroup && strcmp (mailgroup, "off")) { /* for SYS5 sgid-inc */
- fprintf (fp, "/^@BEGIN: MAILGROUP$/d\n/^@END: MAILGROUP$/d\n");
- fprintf (fp, "s%%@(MAILGROUP)%%%s%%g\n", SVAL (mailgroup));
- }
- --- 400,406 ----
- fprintf (fp, "/^@BEGIN: OPTIM$/d\n/^@END: OPTIM$/d\n");
- }
-
- ! if (strcmp (mailgroup, "off")) { /* for SYS5 sgid-inc */
- fprintf (fp, "/^@BEGIN: MAILGROUP$/d\n/^@END: MAILGROUP$/d\n");
- fprintf (fp, "s%%@(MAILGROUP)%%%s%%g\n", SVAL (mailgroup));
- }
- ***************
- *** 365,370 ****
- --- 416,423 ----
- else
- fprintf (fp, "/^@BEGIN: NEWLOAD$/,/^@END: NEWLOAD$/d\n");
-
- + /* */
- +
- if (strcmp (ranlib, "on") == 0) {
- fprintf (fp, "/^@BEGIN: RANLIB$/d\n/^@END: RANLIB$/d\n");
- fprintf (fp, "/^@BEGIN: LORDER$/,/^@END: LORDER$/d\n");
- ***************
- *** 374,384 ****
- fprintf (fp, "/^@BEGIN: RANLIB$/,/^@END: RANLIB$/d\n");
- }
-
- ! if (strcmp (sharedlib, "on") == 0 || strcmp (sharedlib, "secure") == 0) {
- fprintf (fp, "/^@BEGIN: SHAREDLIB$/d\n/^@END: SHAREDLIB$/d\n");
- fprintf (fp, "/^@BEGIN: STDLIB$/,/^@END: STDLIB$/d\n");
- ! fprintf (fp, "s%%@(SLIBDIR)%%%s%%g\n",slibdir);
- fprintf (fp, "s%%@(SLIBVER)%%%s%%g\n", MHSLIBVER);
- if (strcmp (sharedlib, "secure") == 0)
- fprintf (fp, "s%%@(SLDFLAG)%%-L%s%%g\n",slibdir);
- else
- --- 427,438 ----
- fprintf (fp, "/^@BEGIN: RANLIB$/,/^@END: RANLIB$/d\n");
- }
-
- ! if (strcmp (sharedlib, "off")) { /* if not off */
- fprintf (fp, "/^@BEGIN: SHAREDLIB$/d\n/^@END: SHAREDLIB$/d\n");
- fprintf (fp, "/^@BEGIN: STDLIB$/,/^@END: STDLIB$/d\n");
- ! fprintf (fp, "s%%@(SLIBDIR)%%%s%%g\n", slibdir);
- fprintf (fp, "s%%@(SLIBVER)%%%s%%g\n", MHSLIBVER);
- + fprintf (fp, "s%%@(SLFLAGS)%%%s%%g\n", SVAL(slflags));
- if (strcmp (sharedlib, "secure") == 0)
- fprintf (fp, "s%%@(SLDFLAG)%%-L%s%%g\n",slibdir);
- else
- ***************
- *** 388,398 ****
- fprintf (fp, "/^@BEGIN: STDLIB$/d\n/^@END: STDLIB$/d\n");
- fprintf (fp, "/^@BEGIN: SHAREDLIB$/,/^@END: SHAREDLIB$/d\n");
- }
- !
- ! if (strcmp (tma, "on") == 0)
- ! fprintf (fp, "/^@BEGIN: TMA$/d\n/^@END: TMA$/d\n");
- else
- ! fprintf (fp, "/^@BEGIN: TMA$/,/^@END: TMA$/d\n");
- if (flag || ((mtsnum == mmdf || mtsnum == mmdf2) && !smtp)) {
- fprintf (fp, "/^@BEGIN: MMDFMTS$/d\n/^@END: MMDFMTS$/d\n");
- if (mtsnum == mmdf)
- --- 442,458 ----
- fprintf (fp, "/^@BEGIN: STDLIB$/d\n/^@END: STDLIB$/d\n");
- fprintf (fp, "/^@BEGIN: SHAREDLIB$/,/^@END: SHAREDLIB$/d\n");
- }
- ! if (strcmp (sharedlib, "sun4") == 0 || strcmp (sharedlib, "on") == 0)
- ! fprintf (fp, "/^@BEGIN: SUN4SHLIB$/d\n/^@END: SUN4SHLIB$/d\n");
- else
- ! fprintf (fp, "/^@BEGIN: SUN4SHLIB$/,/^@END: SUN4SHLIB$/d\n");
- ! if (strcmp (sharedlib, "sys5") == 0)
- ! fprintf (fp, "/^@BEGIN: SYS5SHLIB$/d\n/^@END: SYS5SHLIB$/d\n");
- ! else
- ! fprintf (fp, "/^@BEGIN: SYS5SHLIB$/,/^@END: SYS5SHLIB$/d\n");
- !
- ! /* */
- !
- if (flag || ((mtsnum == mmdf || mtsnum == mmdf2) && !smtp)) {
- fprintf (fp, "/^@BEGIN: MMDFMTS$/d\n/^@END: MMDFMTS$/d\n");
- if (mtsnum == mmdf)
- ***************
- *** 431,450 ****
- fprintf (fp, "/^@BEGIN: SENDMTSHACK$/,/^@END: SENDMTSHACK$/d\n");
- break;
- }
- /* special hack for support/pop/popser.c */
- fprintf (fp, "s%%@(POPUUMBOX)%%%s%%g\n",
- mtsnum == sendmail ? "-DPOPUUMBOX" : "");
-
- - if (bsd43) /* for sgid(tty)-rcvtty */
- - fprintf (fp, "/^@BEGIN: BSD43$/d\n/^@END: BSD43$/d\n");
- - else
- - fprintf (fp, "/^@BEGIN: BSD43$/,/^@END: BSD43$/d\n");
- -
- - if (uci)
- - fprintf (fp, "/^@BEGIN: UCI$/d\n/^@END: UCI$/d\n");
- - else
- - fprintf (fp, "/^@BEGIN: UCI$/,/^@END: UCI$/d\n");
- -
- if (smtp)
- fprintf (fp, "/^@BEGIN: SMTP$/d\n/^@END: SMTP$/d\n");
- else
- --- 491,503 ----
- fprintf (fp, "/^@BEGIN: SENDMTSHACK$/,/^@END: SENDMTSHACK$/d\n");
- break;
- }
- +
- + /* */
- +
- /* special hack for support/pop/popser.c */
- fprintf (fp, "s%%@(POPUUMBOX)%%%s%%g\n",
- mtsnum == sendmail ? "-DPOPUUMBOX" : "");
-
- if (smtp)
- fprintf (fp, "/^@BEGIN: SMTP$/d\n/^@END: SMTP$/d\n");
- else
- ***************
- *** 472,477 ****
- --- 525,536 ----
-
- fprintf (fp, "s%%@(MHREMOVE)%%%s%%g\n", SVAL (removeit));
-
- + for (op = copts; op->c_name; op++) {
- + fprintf (fp, op->c_value ? "/^@BEGIN: %s$/d\n/^@END: %s$/d\n" :
- + "/^@BEGIN: %s$/,/^@END: %s$/d\n",
- + op->c_name, op->c_name);
- + }
- +
- (void) fclose (fp);
- }
-
- ***************
- *** 570,598 ****
- }
- break;
- }
- ! if ((config = *vec++) == NULL || *vec != NULL)
- adios (NULLCP, "usage: %s file", myname);
-
- if ((fp = fopen (config, "r")) == NULL)
- adios (config, "unable to read");
-
- while (fgets (buffer, sizeof buffer, fp)) {
- if (ap = index (buffer, '\n'))
- ! *ap-- = NULL;
- else
- ap = &buffer[strlen (buffer) - 1];
- while (ap >= buffer)
- if (isspace (*ap))
- ! *ap = NULL;
- else
- break;
- for (cp = buffer; isspace (*cp); cp++)
- continue;
- ! if (*cp == NULL || *cp == '#')
- continue;
- for (ap = cp; *ap; ap++)
- ! if (isspace (*ap)) {
- ! *ap++ = NULL;
- while (isspace (*ap))
- ap++;
- break;
- --- 629,659 ----
- }
- break;
- }
- ! if ((config = *vec) == NULL || vec[1] != NULL) /* no arg or too many */
- adios (NULLCP, "usage: %s file", myname);
-
- + /* */
- +
- if ((fp = fopen (config, "r")) == NULL)
- adios (config, "unable to read");
-
- while (fgets (buffer, sizeof buffer, fp)) {
- if (ap = index (buffer, '\n'))
- ! *ap-- = '\0';
- else
- ap = &buffer[strlen (buffer) - 1];
- while (ap >= buffer)
- if (isspace (*ap))
- ! *ap = '\0';
- else
- break;
- for (cp = buffer; isspace (*cp); cp++)
- continue;
- ! if (*cp == '\0' || *cp == '#')
- continue;
- for (ap = cp; *ap; ap++)
- ! if (isspace (*ap) || *ap == ':') {
- ! *ap++ = '\0';
- while (isspace (*ap))
- ap++;
- break;
- ***************
- *** 637,642 ****
- --- 698,705 ----
- adios (NULLCP, "etc must be specified in %s", config);
- trim (etcpath);
-
- + if (strcmp (mailgroup, "off")) /* if not "off" */
- + add_option ("MAILGROUP");
- if (mailpath == NULL)
- adios (NULLCP, "mail must be specified in %s", config);
- trim (mailpath);
- ***************
- *** 678,683 ****
- --- 741,749 ----
- else if (strcmp (bboards, "nntp") == 0) {
- add_option ("BPOP");/* used by msh.c & bbc.c, but see also pshsbr.c */
- add_option ("NNTP");
- + if (mpop)
- + adios (NULLCP,
- + "bboards \"nntp\" is incompatible with \"options MPOP\"");
- }
-
- if (strcmp (mf, "on") && strcmp (mf, "off"))
- ***************
- *** 694,709 ****
- }
-
- if (strcmp (sharedlib, "on") && strcmp (sharedlib, "off")
- && strcmp (sharedlib, "secure"))
- adios (NULLCP,
- ! "sharedlib should be either \"on\", \"off\", or \"secure\", not %s",
- sharedlib);
-
- ! if (strcmp (tma, "on") && strcmp (tma, "off"))
- ! adios (NULLCP, "tma should be either \"on\" or \"off\", not %s", tma);
- ! if (strcmp (tma, "on") == 0)
- ! add_option ("TMA");
-
- begin_myopt ();
- if (cp = options) {
- for (ap = cp; *ap; ap++)
- --- 760,776 ----
- }
-
- if (strcmp (sharedlib, "on") && strcmp (sharedlib, "off")
- + && strcmp (sharedlib, "sun4") && strcmp (sharedlib, "sys5")
- && strcmp (sharedlib, "secure"))
- adios (NULLCP,
- ! "sharedlib should be either \"sun4\", \"sys5\", or \"off\", not %s",
- sharedlib);
-
- ! (void) sprintf(buffer, "TYPESIG=%s", signl);
- ! add_option (buffer);
-
- + /* loop over options string and add -D ccoptions */
- +
- begin_myopt ();
- if (cp = options) {
- for (ap = cp; *ap; ap++)
- ***************
- *** 711,717 ****
- *ap = ' ';
- options = NULL;
- for (ap = cp; dp = index (ap, ' '); ap = dp) {
- ! *dp++ = NULL;
- add_myopt (ap);
- (void) sprintf (buffer, "%s-D%s", options ? " " : "", ap);
- ap = buffer;
- --- 778,784 ----
- *ap = ' ';
- options = NULL;
- for (ap = cp; dp = index (ap, ' '); ap = dp) {
- ! *dp++ = '\0';
- add_myopt (ap);
- (void) sprintf (buffer, "%s-D%s", options ? " " : "", ap);
- ap = buffer;
- ***************
- *** 728,733 ****
- --- 795,803 ----
- free (cp);
- }
- end_myopt ();
- + if (strcmp (bboards, "nntp") == 0 && mpop)
- + adios (NULLCP,
- + "bboards \"nntp\" is incompatible with \"options MPOP\"");
- }
-
- /* */
- ***************
- *** 750,765 ****
- int len;
- char *bp,
- buffer[BUFSIZ];
- static int nameoutput = 0;
- static int linepos = 0;
- static int outputlinelen = 72;
-
- if (smtp && strcmp (s, "BERK") == 0) {
- fprintf (stderr, "\"options BERK\" overriding smtp suffix...\n");
- smtp = 0;
- }
- - if (strcmp (s, "UCI") == 0) uci = 1;
- - if (strcmp (s, "BSD43") == 0) bsd43 = 1;
- if (!nameoutput) {
- printf ("%s: ", bp = "options");
- linepos += (nameoutput = strlen (bp) + 2);
- --- 820,842 ----
- int len;
- char *bp,
- buffer[BUFSIZ];
- + struct copt *op;
- static int nameoutput = 0;
- static int linepos = 0;
- static int outputlinelen = 72;
-
- + for (op = copts; op->c_name; op++)
- + if (!strncmp (op->c_name,s,strlen(op->c_name))) {
- + op->c_value = 1;
- + break;
- + }
- +
- + if (strcmp (s, "MPOP") == 0)
- + mpop = 1;
- if (smtp && strcmp (s, "BERK") == 0) {
- fprintf (stderr, "\"options BERK\" overriding smtp suffix...\n");
- smtp = 0;
- }
- if (!nameoutput) {
- printf ("%s: ", bp = "options");
- linepos += (nameoutput = strlen (bp) + 2);
- ***************
- *** 802,809 ****
-
- if (s == NULL || (p = rindex (s, '/')) == NULL)
- return;
- ! if (*++p == NULL)
- ! *--p = NULL;
- }
-
-
- --- 879,886 ----
-
- if (s == NULL || (p = rindex (s, '/')) == NULL)
- return;
- ! if (*++p == '\0')
- ! *--p = '\0';
- }
-
-
- ***************
- *** 814,820 ****
-
- if (p = rindex (s, '/'))
- p++;
- ! return ((p == NULL || *p == NULL) ? s : p);
- }
-
- /* */
- --- 891,897 ----
-
- if (p = rindex (s, '/'))
- p++;
- ! return ((p == NULL || *p == '\0') ? s : p);
- }
-
- /* */
- ***************
- *** 825,831 ****
- {
- char *p;
-
- ! if (s1 == NULL || *s1 == NULL)
- return s2;
- if (s2 == NULL)
- return strdup (s1);
- --- 902,908 ----
- {
- char *p;
-
- ! if (s1 == NULL || *s1 == '\0')
- return s2;
- if (s2 == NULL)
- return strdup (s1);
- ***************
- *** 885,891 ****
-
- return t;
- }
- ! #endif notdef
-
- /* */
-
- --- 962,968 ----
-
- return t;
- }
- ! #endif /* notdef */
-
- /* */
-
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/tailor/clcs.com.au Thu Dec 10 11:37:57 1992
- ***************
- *** 0 ****
- --- 1,11 ----
- + mmdfldir: /var/mail
- + mmdflfil:
- + hostable: /usr/local/lib/mh/hosts
- + sendmail: /usr/ucblib/sendmail
- + okhosts: /usr/local/lib/mh/Rmail.OKHosts
- + okdests: /usr/local/lib/mh/Rmail.OKDests
- +
- + systemname: mars
- + localname: mars
- + servers: mars \01localnet
- +
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/tailor/dbc Wed Dec 2 13:32:06 1992
- ***************
- *** 0 ****
- --- 1,4 ----
- + mmdfldir:
- + mmdflfil: .maildrop
- + hostable: /usr/local/lib/mh/hosts
- + servers: localhost
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/tailor/ncr-sys5r4 Mon Feb 10 16:52:47 1992
- ***************
- *** 0 ****
- --- 1,10 ----
- + localname: ncrtest.ncr.com
- + systemname: ncrtest
- + mmdfldir:
- + mmdflfil: .mail
- + mmdelim1: \001\001\001\001\n
- + mmdelim2: \001\001\001\001\n
- + hostable: /usr/local/lib/mh/hosts
- + servers: localhost \01localnet
- + lockldir: /usr/mmdf/log/locks
- + lockstyle: 2
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- conf/tailor/rpi.edu Fri Dec 4 09:14:43 1992
- ***************
- *** 0 ****
- --- 1,9 ----
- + everyone: 65334
- + localname: rpi.edu
- + lockstyle: 0
- + lockldir:
- + mmdfldir: /usr/spool/mail
- + mmdflfil:
- + hostable: /etc/hosts
- + servers: mail.its.rpi.edu mail1.its.rpi.edu rpi.edu \01rpi.edu
- + pophost: mail.its.rpi.edu
- *** ../mh-6.7.2/config/version.sh Thu Jan 30 14:20:46 1992
- --- config/version.sh Wed Feb 5 13:07:41 1992
- ***************
- *** 1,3 ****
- : run this script through /bin/sh
- ! : '@(#)$Id: version.sh,v 1.9 1992/01/30 22:20:41 jromine Exp $'
- case $# in
- --- 1,3 ----
- : run this script through /bin/sh
- ! : '@(#)$Id: version.sh,v 1.9 1992/01/30 22:20:41 jromine Exp jromine $'
- case $# in
- ***************
- *** 4,5 ****
- --- 4,6 ----
- 0) set "6.6";;
- + 2) flag="$1"; shift;;
- esac
- ***************
- *** 48,50 ****
- if (patch > 0) {\
- ! printf "char *version = \"@(#)MH %s.%s.%s #%d[UCI] ", \
- major, minor, patch, local > "version.c"; \
- --- 49,51 ----
- if (patch > 0) {\
- ! printf "char *version = \"@(#)MH %s.%s.%s #%d[UCI]", \
- major, minor, patch, local > "version.c"; \
- ***************
- *** 62,63 ****
- }' && mv _version version
- ! echo '('$LOCAL') of '`date`'";' >> version.c
- --- 63,67 ----
- }' && mv _version version
- ! case x${flag} in
- ! x) echo ' ('$LOCAL') of '`date`'";' >> version.c ;;
- ! x-n) echo '";' >> version.c ;;
- ! esac
- *** ../mh-6.7.2/dist/Makefile Thu Feb 13 12:26:30 1992
- --- dist/Makefile Mon Dec 14 16:36:08 1992
- ***************
- *** 4,6 ****
- # This file is automatically generated. Do not edit!
- ! # @(#)$Id: dist,v 2.6 90/04/08 20:01:28 sources Exp $
- ##############################################################################
- --- 4,6 ----
- # This file is automatically generated. Do not edit!
- ! # @(#)$Id: dist,v 2.7 1992/12/02 22:21:43 jromine Exp $
- ##############################################################################
- ***************
- *** 27,29 ****
- TARGETS = ../READ-ME \
- ! mh-gen.cat MH.cat ADMIN.cat mh6.7.cat \
- bboards.dvi beginners.dvi mh4mm.dvi mh6.dvi multifarious.dvi \
- --- 27,29 ----
- TARGETS = ../READ-ME \
- ! mh-gen.cat MH.cat ADMIN.cat mh-changes.cat \
- bboards.dvi beginners.dvi mh4mm.dvi mh6.dvi multifarious.dvi \
- ***************
- *** 35,37 ****
-
- ! doc: MH.doc ADMIN.doc mh6.7.doc
-
- --- 35,37 ----
-
- ! doc: MH.doc ADMIN.doc mh-changes.doc
-
- ***************
- *** 38,40 ****
-
- ! IMPRESS = mh-gen.imp MH.imp ADMIN.imp mh6.7.imp \
- bboards.imp beginners.imp \
- --- 38,40 ----
-
- ! IMPRESS = mh-gen.imp MH.imp ADMIN.imp mh-changes.imp \
- bboards.imp beginners.imp \
- ***************
- *** 50,52 ****
- lpr -t -J ADMIN ADMIN.cat
- ! lpr -t -J MH.6.7 mh6.7.cat
- lpr -d -J BBoards bboards.dvi
- --- 50,52 ----
- lpr -t -J ADMIN ADMIN.cat
- ! lpr -t -J MH-CHANGES mh-changes.cat
- lpr -d -J BBoards bboards.dvi
- ***************
- *** 83,89 ****
-
- ! mh6.7.cat \
- ! mh6.7.doc \
- ! mh6.7.imp: true
- ! cd ../papers/mh6.7; make $@
- ! cp ../papers/mh6.7/$@ $@
-
- --- 83,89 ----
-
- ! mh-changes.cat \
- ! mh-changes.doc \
- ! mh-changes.imp: true
- ! cd ../papers/changes; make $@
- ! cp ../papers/changes/$@ $@
-
- *** ../mh-6.7.2/h/addrsbr.h Thu Oct 29 14:56:13 1987
- --- h/addrsbr.h Tue May 12 15:01:15 1992
- ***************
- *** 31,37 ****
-
- #ifdef MHMTS
- char *m_aka;
- ! #endif MHMTS
- };
-
-
- --- 31,37 ----
-
- #ifdef MHMTS
- char *m_aka;
- ! #endif /* MHMTS */
- };
-
-
- *** ../mh-6.7.2/h/aliasbr.h Thu Oct 29 14:56:14 1987
- --- h/aliasbr.h Tue May 12 15:03:31 1992
- ***************
- *** 1,4 ****
- --- 1,5 ----
- /* aliasbr.h - definitions for the aliasing system */
- + /* $Id: aliasbr.h,v 1.2 1992/05/12 22:03:31 jromine Exp $ */
-
-
- extern char *AliasFile; /* mh-alias(5) */
- ***************
- *** 30,42 ****
- char *h_shell; /* user's shell */
- #ifdef BSD42
- int h_ngrps; /* number of groups this user belongs to */
- ! #endif BSD42
- struct home *h_next; /* next home in list */
- };
-
- #ifndef MMDFMTS
- struct home *seek_home ();
- ! #endif MMDFMTS
-
- int alias (), akvisible (), init_pw ();
- char *akresult (), *akvalue (), *akerror ();
- --- 31,43 ----
- char *h_shell; /* user's shell */
- #ifdef BSD42
- int h_ngrps; /* number of groups this user belongs to */
- ! #endif /* BSD42 */
- struct home *h_next; /* next home in list */
- };
-
- #ifndef MMDFMTS
- struct home *seek_home ();
- ! #endif /* MMDFMTS */
-
- int alias (), akvisible (), init_pw ();
- char *akresult (), *akvalue (), *akerror ();
- *** ../mh-6.7.2/h/fmtcompile.h Thu Jan 23 15:16:10 1992
- --- h/fmtcompile.h Tue Nov 17 09:50:36 1992
- ***************
- *** 1,4 ****
- ! /* @(#)$Id: fmtcompile.h,v 1.8 1992/01/23 23:16:05 jromine Exp $ */
-
- /* Format Types */
- /* -------------*/
- --- 1,4 ----
- ! /* @(#)$Id: fmtcompile.h,v 1.9 1992/02/09 07:12:48 jromine Exp $ */
-
- /* Format Types */
- /* -------------*/
- ***************
- *** 29,105 ****
- #define FT_LV_PLUS_L 21 /* set "value" += literal */
- #define FT_LV_MINUS_L 22 /* set "value" -= literal */
- #define FT_LV_DIVIDE_L 23 /* set "value" to value / literal */
- ! #define FT_LV_CHAR_LEFT 24 /* set "value" to char left in output */
-
- ! #define FT_LS_MONTH 25 /* set "str" to tws month */
- ! #define FT_LS_LMONTH 26 /* set "str" to long tws month */
- ! #define FT_LS_ZONE 27 /* set "str" to tws timezone */
- ! #define FT_LS_DAY 28 /* set "str" to tws weekday */
- ! #define FT_LS_WEEKDAY 29 /* set "str" to long tws weekday */
- ! #define FT_LS_822DATE 30 /* set "str" to 822 date str */
- ! #define FT_LS_PRETTY 31 /* set "str" to pretty (?) date str */
- ! #define FT_LV_SEC 32 /* set "value" to tws second */
- ! #define FT_LV_MIN 33 /* set "value" to tws minute */
- ! #define FT_LV_HOUR 34 /* set "value" to tws hour */
- ! #define FT_LV_MDAY 35 /* set "value" to tws day of month */
- ! #define FT_LV_MON 36 /* set "value" to tws month */
- ! #define FT_LV_YEAR 37 /* set "value" to tws year */
- ! #define FT_LV_YDAY 38 /* set "value" to tws day of year */
- ! #define FT_LV_WDAY 39 /* set "value" to tws weekday */
- ! #define FT_LV_ZONE 40 /* set "value" to tws timezone */
- ! #define FT_LV_CLOCK 41 /* set "value" to tws clock */
- ! #define FT_LV_RCLOCK 42 /* set "value" to now - tws clock */
- ! #define FT_LV_DAYF 43 /* set "value" to tws day flag */
- ! #define FT_LV_DST 44 /* set "value" to tws daylight savings flag */
- ! #define FT_LV_ZONEF 45 /* set "value" to tws timezone flag */
-
- ! #define FT_LS_PERS 46 /* set "str" to person part of addr */
- ! #define FT_LS_MBOX 47 /* set "str" to mbox part of addr */
- ! #define FT_LS_HOST 48 /* set "str" to host part of addr */
- ! #define FT_LS_PATH 49 /* set "str" to route part of addr */
- ! #define FT_LS_GNAME 50 /* set "str" to group part of addr */
- ! #define FT_LS_NOTE 51 /* set "str" to comment part of addr */
- ! #define FT_LS_ADDR 52 /* set "str" to mbox@host */
- ! #define FT_LS_822ADDR 53 /* set "str" to 822 format addr */
- ! #define FT_LS_FRIENDLY 54 /* set "str" to "friendly" format addr */
- ! #define FT_LV_HOSTTYPE 55 /* set "value" to addr host type */
- ! #define FT_LV_INGRPF 56 /* set "value" to addr in-group flag */
- ! #define FT_LV_NOHOSTF 57 /* set "value" to addr no-host flag */
-
- /* Date Coercion */
- ! #define FT_LOCALDATE 58 /* Coerce date to local timezone */
- ! #define FT_GMTDATE 59 /* Coerce date to gmt */
-
- /* pre-format processing */
- ! #define FT_PARSEDATE 60 /* parse comp into a date (tws) struct */
- ! #define FT_PARSEADDR 61 /* parse comp into a mailaddr struct */
- ! #define FT_FORMATADDR 62 /* let external routine format addr */
- ! #define FT_MYMBOX 63 /* do "mymbox" test on comp */
-
- ! /* misc. */
- ! #ifdef VAN
- ! #define FT_ADDTOSEQ 64 /* add current msg to a sequence */
- ! #endif
-
- /* conditionals & control flow (must be last) */
- ! #define FT_SAVESTR 65 /* save current str reg */
- ! #define FT_DONE 66 /* stop formatting */
- ! #define FT_PAUSE 67 /* pause */
- ! #define FT_NOP 68 /* nop */
- ! #define FT_GOTO 69 /* (relative) goto */
- ! #define FT_IF_S_NULL 70 /* test if "str" null */
- ! #define FT_IF_S 71 /* test if "str" non-null */
- ! #define FT_IF_V_EQ 72 /* test if "value" = literal */
- ! #define FT_IF_V_NE 73 /* test if "value" != literal */
- ! #define FT_IF_V_GT 74 /* test if "value" > literal */
- ! #define FT_IF_MATCH 75 /* test if "str" contains literal */
- ! #define FT_IF_AMATCH 76 /* test if "str" starts with literal */
- ! #define FT_S_NULL 77 /* V = 1 if "str" null */
- ! #define FT_S_NONNULL 78 /* V = 1 if "str" non-null */
- ! #define FT_V_EQ 79 /* V = 1 if "value" = literal */
- ! #define FT_V_NE 80 /* V = 1 if "value" != literal */
- ! #define FT_V_GT 81 /* V = 1 if "value" > literal */
- ! #define FT_V_MATCH 82 /* V = 1 if "str" contains literal */
- ! #define FT_V_AMATCH 83 /* V = 1 if "str" starts with literal */
-
- ! #define IF_FUNCS FT_S_NULL /* start of "if" functions */
- --- 29,104 ----
- #define FT_LV_PLUS_L 21 /* set "value" += literal */
- #define FT_LV_MINUS_L 22 /* set "value" -= literal */
- #define FT_LV_DIVIDE_L 23 /* set "value" to value / literal */
- ! #define FT_LV_MODULO_L 24 /* set "value" to value % literal */
- ! #define FT_LV_CHAR_LEFT 25 /* set "value" to char left in output */
-
- ! #define FT_LS_MONTH 26 /* set "str" to tws month */
- ! #define FT_LS_LMONTH 27 /* set "str" to long tws month */
- ! #define FT_LS_ZONE 28 /* set "str" to tws timezone */
- ! #define FT_LS_DAY 29 /* set "str" to tws weekday */
- ! #define FT_LS_WEEKDAY 30 /* set "str" to long tws weekday */
- ! #define FT_LS_822DATE 31 /* set "str" to 822 date str */
- ! #define FT_LS_PRETTY 32 /* set "str" to pretty (?) date str */
- ! #define FT_LV_SEC 33 /* set "value" to tws second */
- ! #define FT_LV_MIN 34 /* set "value" to tws minute */
- ! #define FT_LV_HOUR 35 /* set "value" to tws hour */
- ! #define FT_LV_MDAY 36 /* set "value" to tws day of month */
- ! #define FT_LV_MON 37 /* set "value" to tws month */
- ! #define FT_LV_YEAR 38 /* set "value" to tws year */
- ! #define FT_LV_YDAY 39 /* set "value" to tws day of year */
- ! #define FT_LV_WDAY 40 /* set "value" to tws weekday */
- ! #define FT_LV_ZONE 41 /* set "value" to tws timezone */
- ! #define FT_LV_CLOCK 42 /* set "value" to tws clock */
- ! #define FT_LV_RCLOCK 43 /* set "value" to now - tws clock */
- ! #define FT_LV_DAYF 44 /* set "value" to tws day flag */
- ! #define FT_LV_DST 45 /* set "value" to tws daylight savings flag */
- ! #define FT_LV_ZONEF 46 /* set "value" to tws timezone flag */
-
- ! #define FT_LS_PERS 47 /* set "str" to person part of addr */
- ! #define FT_LS_MBOX 48 /* set "str" to mbox part of addr */
- ! #define FT_LS_HOST 49 /* set "str" to host part of addr */
- ! #define FT_LS_PATH 50 /* set "str" to route part of addr */
- ! #define FT_LS_GNAME 51 /* set "str" to group part of addr */
- ! #define FT_LS_NOTE 52 /* set "str" to comment part of addr */
- ! #define FT_LS_ADDR 53 /* set "str" to mbox@host */
- ! #define FT_LS_822ADDR 54 /* set "str" to 822 format addr */
- ! #define FT_LS_FRIENDLY 55 /* set "str" to "friendly" format addr */
- ! #define FT_LV_HOSTTYPE 56 /* set "value" to addr host type */
- ! #define FT_LV_INGRPF 57 /* set "value" to addr in-group flag */
- ! #define FT_LV_NOHOSTF 58 /* set "value" to addr no-host flag */
-
- /* Date Coercion */
- ! #define FT_LOCALDATE 59 /* Coerce date to local timezone */
- ! #define FT_GMTDATE 60 /* Coerce date to gmt */
-
- /* pre-format processing */
- ! #define FT_PARSEDATE 61 /* parse comp into a date (tws) struct */
- ! #define FT_PARSEADDR 62 /* parse comp into a mailaddr struct */
- ! #define FT_FORMATADDR 63 /* let external routine format addr */
- ! #define FT_MYMBOX 64 /* do "mymbox" test on comp */
-
- ! /* misc. */ /* ADDTOSEQ only works if you include "options LBL" */
- ! #define FT_ADDTOSEQ 65 /* add current msg to a sequence */
-
- /* conditionals & control flow (must be last) */
- ! #define FT_SAVESTR 66 /* save current str reg */
- ! #define FT_DONE 67 /* stop formatting */
- ! #define FT_PAUSE 68 /* pause */
- ! #define FT_NOP 69 /* nop */
- ! #define FT_GOTO 70 /* (relative) goto */
- ! #define FT_IF_S_NULL 71 /* test if "str" null */
- ! #define FT_IF_S 72 /* test if "str" non-null */
- ! #define FT_IF_V_EQ 73 /* test if "value" = literal */
- ! #define FT_IF_V_NE 74 /* test if "value" != literal */
- ! #define FT_IF_V_GT 75 /* test if "value" > literal */
- ! #define FT_IF_MATCH 76 /* test if "str" contains literal */
- ! #define FT_IF_AMATCH 77 /* test if "str" starts with literal */
- ! #define FT_S_NULL 78 /* V = 1 if "str" null */
- ! #define FT_S_NONNULL 79 /* V = 1 if "str" non-null */
- ! #define FT_V_EQ 80 /* V = 1 if "value" = literal */
- ! #define FT_V_NE 81 /* V = 1 if "value" != literal */
- ! #define FT_V_GT 82 /* V = 1 if "value" > literal */
- ! #define FT_V_MATCH 83 /* V = 1 if "str" contains literal */
- ! #define FT_V_AMATCH 84 /* V = 1 if "str" starts with literal */
-
- ! #define IF_FUNCS FT_S_NULL /* start of "if" functions */
- *** ../mh-6.7.2/h/local.h Thu Oct 29 14:56:18 1987
- --- h/local.h Thu Feb 6 09:37:46 1992
- ***************
- *** 1,19 ****
- /* local.h - fine the -lndir include file */
-
- #ifndef BSD42
- #include <sys/types.h>
- ! #else BSD42
- #include <sys/param.h>
- ! #endif BSD42
-
- #ifndef BSD42
- #ifndef NDIR
- ! #include <dir.h>
- ! #else NDIR
- #include <ndir.h>
- ! #endif NDIR
- ! #else BSD42
- #include <sys/dir.h>
- ! #endif BSD42
-
- #include <sys/stat.h>
- --- 1,24 ----
- /* local.h - fine the -lndir include file */
- + /* @(#)$Id: local.h,v 1.3 1992/02/06 17:37:44 jromine Exp $ */
-
- #ifndef BSD42
- #include <sys/types.h>
- ! #else /* BSD42 */
- #include <sys/param.h>
- ! #endif
-
- #ifndef BSD42
- #ifndef NDIR
- ! #ifndef SYS5DIR
- ! #include <dir.h> /* last choice */
- ! #else /* SYS5DIR */
- ! #include <dirent.h>
- ! #endif
- ! #else /* NDIR */
- #include <ndir.h>
- ! #endif
- ! #else /* BSD42 */
- #include <sys/dir.h>
- ! #endif
-
- #include <sys/stat.h>
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- h/md5.h Mon Oct 26 08:38:59 1992
- ***************
- *** 0 ****
- --- 1,71 ----
- + /* @(#)$Id: md5.h,v 1.2 1992/10/26 16:38:50 jromine Exp $ */
- + /* taken from RFC-1321/Appendices A.1/A.2 */
- +
- + /* GLOBAL.H - RSAREF types and constants
- + */
- +
- + /* PROTOTYPES should be set to one if and only if the compiler supports
- + function argument prototyping.
- + The following makes PROTOTYPES default to 0 if it has not already
- + been defined with C compiler flags.
- + */
- + #ifndef PROTOTYPES
- + #define PROTOTYPES 0
- + #endif
- +
- + /* POINTER defines a generic pointer type */
- + typedef unsigned char *POINTER;
- +
- + /* UINT2 defines a two byte word */
- + typedef unsigned short int UINT2;
- +
- + /* UINT4 defines a four byte word */
- + typedef unsigned long int UINT4;
- +
- + /* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
- + If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
- + returns an empty list.
- + */
- + #if PROTOTYPES
- + #define PROTO_LIST(list) list
- + #else
- + #define PROTO_LIST(list) ()
- + #endif
- +
- + /* MD5.H - header file for MD5C.C
- + */
- +
- + /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
- + rights reserved.
- +
- + License to copy and use this software is granted provided that it
- + is identified as the "RSA Data Security, Inc. MD5 Message-Digest
- + Algorithm" in all material mentioning or referencing this software
- + or this function.
- +
- + License is also granted to make and use derivative works provided
- + that such works are identified as "derived from the RSA Data
- + Security, Inc. MD5 Message-Digest Algorithm" in all material
- + mentioning or referencing the derived work.
- +
- + RSA Data Security, Inc. makes no representations concerning either
- + the merchantability of this software or the suitability of this
- + software for any particular purpose. It is provided "as is"
- + without express or implied warranty of any kind.
- +
- + These notices must be retained in any copies of any part of this
- + documentation and/or software.
- + */
- +
- + /* MD5 context. */
- + typedef struct {
- + UINT4 state[4]; /* state (ABCD) */
- + UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
- + unsigned char buffer[64]; /* input buffer */
- + } MD5_CTX;
- +
- + void MD5Init PROTO_LIST ((MD5_CTX *));
- + void MD5Update PROTO_LIST
- + ((MD5_CTX *, unsigned char *, unsigned int));
- + void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
- +
- *** ../mh-6.7.2/h/mh.h Thu Jan 23 16:03:59 1992
- --- h/mh.h Mon Dec 14 09:10:47 1992
- ***************
- *** 1,5 ****
- /* mh.h - main header file for all of MH */
- ! /* @(#)$Id: mh.h,v 2.7 1992/01/24 00:03:50 jromine Exp $ */
-
-
- /* Well-used constants */
- --- 1,5 ----
- /* mh.h - main header file for all of MH */
- ! /* @(#)$Id: mh.h,v 2.18 1992/12/14 17:10:43 jromine Exp $ */
-
-
- /* Well-used constants */
- ***************
- *** 10,15 ****
- --- 10,16 ----
- #define ALL ""
- #define NULLCP ((char *) 0)
- #define NULLVP ((char **) 0)
- + #define Nbby 8 /* number of bits/byte */
-
- #define MAXARGS 1000 /* max arguments to exec */
-
- ***************
- *** 22,30 ****
- #endif
- #define DMAXFOLDER 4 /* typical number of digits */
-
- ! #if !defined(BSD42) && !defined(BSD41A) && !defined(VMUNIX) && !defined(hpux)
- #define vfork fork
- ! #endif not BSD /* how sad... */
-
- /* */
-
- --- 23,31 ----
- #endif
- #define DMAXFOLDER 4 /* typical number of digits */
-
- ! #if (!defined(BSD42) && !defined(BSD41A) && !defined(VMUNIX) && !defined(hpux)) || defined(_AIX)
- #define vfork fork
- ! #endif /* not BSD */ /* how sad... */
-
- /* */
-
- ***************
- *** 67,76 ****
-
- char *foldpath; /* Pathname of folder */
-
- ! char msgflags; /* Folder status bits */
- #ifndef MTR
- char pad1[sizeof (int) - sizeof (char)];
- ! #endif not MTR
- #define READONLY 0x01 /* No write access to folder */
- #define SEQMOD 0x02 /* folder's sequences modifed */
- #define MHPATH 0x04 /* mhpath-style folder handling */
- --- 68,77 ----
-
- char *foldpath; /* Pathname of folder */
-
- ! int msgflags; /* Folder status bits */
- #ifndef MTR
- char pad1[sizeof (int) - sizeof (char)];
- ! #endif /* not MTR */
- #define READONLY 0x01 /* No write access to folder */
- #define SEQMOD 0x02 /* folder's sequences modifed */
- #define MHPATH 0x04 /* mhpath-style folder handling */
- ***************
- *** 78,104 ****
- #define MODIFIED 0x10 /* msh in-core folder modified */
- #define FBITS "\020\01READONLY\02SEQMOD\03MHPATH\04OTHERS\05MODIFIED"
-
- ! /* Note well: msgstats[] is a short, so we have 16 bits to work
- with. The first 5 are for standard MH message flags,
- ! this leaves us 11 for user-defined attributes. Of these,
- ! 1 is reserved for future internal use, so this leaves
- ! users 10. */
- ! #define NATTRS 10 /* could be 11, see above */
- char *msgattrs[NATTRS + 1];/* folder attributes */
- ! short attrstats; /* public=0/private=1 */
- ! #ifndef MTR
- ! char pad2[sizeof (int) - sizeof (short)];
- ! #endif not MTR
-
- int lowoff; /* low element in msgstats[] */
- int hghoff; /* hgh element in msgstats[] */
-
- #ifndef MTR
- ! short msgstats[1]; /* msg status */
- ! #else MTR
- ! short *msgbase; /* msg base */
- ! short *msgstats; /* msg status */
- ! #endif MTR
- #define EXISTS 0x0001 /* exists */
- #define DELETED 0x0002 /* deleted */
- #define SELECTED 0x0004 /* selected for use */
- --- 79,102 ----
- #define MODIFIED 0x10 /* msh in-core folder modified */
- #define FBITS "\020\01READONLY\02SEQMOD\03MHPATH\04OTHERS\05MODIFIED"
-
- ! /* Note well: msgstats[] is a int, so we have 16 or 32 bits to work
- with. The first 5 are for standard MH message flags,
- ! this leaves us 11 (or 27) for user-defined attributes. Of
- ! these, 1 is reserved for future internal use, so this leaves
- ! users 10 (or 26). */
- ! #define NATTRS ((sizeof(int)*Nbby)-6) /* see above */
- char *msgattrs[NATTRS + 1];/* folder attributes */
- ! int attrstats; /* public=0/private=1 */
-
- int lowoff; /* low element in msgstats[] */
- int hghoff; /* hgh element in msgstats[] */
-
- #ifndef MTR
- ! int msgstats[1]; /* msg status */
- ! #else /* MTR */
- ! int *msgbase; /* msg base */
- ! int *msgstats; /* msg status */
- ! #endif /* MTR */
- #define EXISTS 0x0001 /* exists */
- #define DELETED 0x0002 /* deleted */
- #define SELECTED 0x0004 /* selected for use */
- ***************
- *** 110,122 ****
- #define MBITS "\020\01EXISTS\02DELETED\03SELECTED\04NEW\05UNSEEN"
-
- #ifndef MTR
- ! #define MSIZE(mp,lo,hi) \
- ((unsigned) (sizeof *mp + ((hi) + 2) * sizeof *mp -> msgstats))
- ! #else MTR
- ! #define MSIZE(mp,lo,hi) ((unsigned) sizeof *mp)
- ! #define MSIZEX(mp,lo,hi) \
- ((unsigned) (((hi) - (lo) + 1) * sizeof *mp -> msgstats))
- ! #endif MTR
- };
-
- #define NULLMP ((struct msgs *) 0)
- --- 108,120 ----
- #define MBITS "\020\01EXISTS\02DELETED\03SELECTED\04NEW\05UNSEEN"
-
- #ifndef MTR
- ! #define MHSIZE(mp,lo,hi) \
- ((unsigned) (sizeof *mp + ((hi) + 2) * sizeof *mp -> msgstats))
- ! #else /* MTR */
- ! #define MHSIZE(mp,lo,hi) ((unsigned) sizeof *mp)
- ! #define MHSIZEX(mp,lo,hi) \
- ((unsigned) (((hi) - (lo) + 1) * sizeof *mp -> msgstats))
- ! #endif /* MTR */
- };
-
- #define NULLMP ((struct msgs *) 0)
- ***************
- *** 158,168 ****
-
- #ifndef LINK
- #define LINK "@"
- ! #endif not LINK
-
- #ifndef SBACKUP
- #define SBACKUP ","
- ! #endif not SBACKUP
-
-
- #define OUTPUTLINELEN 72 /* default line length for headers */
- --- 156,166 ----
-
- #ifndef LINK
- #define LINK "@"
- ! #endif /* not LINK */
-
- #ifndef SBACKUP
- #define SBACKUP ","
- ! #endif /* not SBACKUP */
-
-
- #define OUTPUTLINELEN 72 /* default line length for headers */
- ***************
- *** 187,192 ****
- --- 185,191 ----
- extern char *fileproc;
- extern char *foldprot;
- extern char *forwcomps;
- + extern char *inbox;
- extern char *incproc;
- extern char *installproc;
- extern char *lproc;
- ***************
- *** 230,236 ****
- #ifdef OVERHEAD
- extern int fd_def;
- extern int fd_ctx;
- ! #endif OVERHEAD
-
- extern char *invo_name; /* pgm invocation name */
- extern char *mypath; /* user's $HOME */
- --- 229,235 ----
- #ifdef OVERHEAD
- extern int fd_def;
- extern int fd_ctx;
- ! #endif /* OVERHEAD */
-
- extern char *invo_name; /* pgm invocation name */
- extern char *mypath; /* user's $HOME */
- ***************
- *** 284,289 ****
- --- 283,289 ----
- char *m_maildir ();
- char *m_mailpath ();
- char *m_name ();
- + int m_putenv ();
- void m_readefs ();
- struct msgs *m_remsg ();
- void m_replace ();
- ***************
- *** 310,316 ****
- int pidstatus ();
- void printsw ();
- void push ();
- - int putenv ();
- char *pwd ();
- char *r1bindex ();
- int refile ();
- --- 310,315 ----
- ***************
- *** 331,352 ****
-
- #include "../h/strings.h"
-
- -
- /* should be in <stdio.h> */
-
- ! #if !defined(SYS5) && !defined(ncr)
- typedef struct _iobuf *FP;
- FP popen ();
- ! #else SYS5
- #define FP FILE*
- ! #endif SYS5
-
-
- /* miscellaneous */
-
- ! #if !defined(BSD42) && !defined(hpux) && !defined(ncr)
- #define rename(f1,f2) (link (f1, f2) != NOTOK ? unlink (f1) : NOTOK)
- ! #endif not BSD42
-
- #define setsig(s,f) if (signal (s, SIG_IGN) != SIG_IGN) \
- (void) signal (s, f)
- --- 330,350 ----
-
- #include "../h/strings.h"
-
- /* should be in <stdio.h> */
-
- ! #if !defined(SYS5) && !defined(ncr) && !defined(_AIX) && !defined(OSF1) && !defined(__convex__)
- typedef struct _iobuf *FP;
- FP popen ();
- ! #else /* SYS5 */
- #define FP FILE*
- ! #endif /* SYS5 */
-
-
- /* miscellaneous */
-
- ! #if !defined(BSD42) && !defined(hpux) && !defined(ncr) && !defined(_AIX) && !defined(RENAME)
- #define rename(f1,f2) (link (f1, f2) != NOTOK ? unlink (f1) : NOTOK)
- ! #endif /* not BSD42 */
-
- #define setsig(s,f) if (signal (s, SIG_IGN) != SIG_IGN) \
- (void) signal (s, f)
- ***************
- *** 353,366 ****
- #define setsigx(i,s,f) if ((i = signal (s, SIG_IGN)) != SIG_IGN) \
- (void) signal (s, f)
-
- - #ifndef TYPESIG
- - #ifdef SUN40
- - #define TYPESIG void
- - #else /* use old V7 default */
- - #define TYPESIG int
- - #endif
- - #endif not TYPESIG
- -
- #if defined(sun) && !defined(NFS)
- #define NFS
- #endif
- --- 351,356 ----
- ***************
- *** 367,370 ****
- --- 357,365 ----
-
- #ifdef NFS
- #define ruserpass _ruserpass
- + #endif
- +
- + #if (defined(BSD44) || defined(SUN40) || defined(hpux) \
- + || defined(_AIX) || defined (sgi)) && !defined(UNISTD)
- + #define UNISTD
- #endif
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- h/mhn.h Tue Oct 20 09:32:28 1992
- ***************
- *** 0 ****
- --- 1,69 ----
- + /* mhn.h - definitions for mhn & friends */
- + /* @(#)$Id: mhn.h,v 1.2 1992/10/16 17:13:19 jromine Exp $ */
- +
- + #define VRSN_FIELD "MIME-Version"
- + #define VRSN_VALUE "1.0"
- +
- + #define XXX_FIELD_PRF "Content-"
- +
- + #define TYPE_FIELD "Content-Type"
- +
- + #define ENCODING_FIELD "Content-Transfer-Encoding"
- +
- + #define ID_FIELD "Content-ID"
- +
- + #define DESCR_FIELD "Content-Description"
- +
- +
- + #define isatom(c) \
- + (!isspace (c) \
- + && !iscntrl (c) \
- + && (c) != '(' \
- + && (c) != ')' \
- + && (c) != '<' \
- + && (c) != '>' \
- + && (c) != '@' \
- + && (c) != ',' \
- + && (c) != ';' \
- + && (c) != ':' \
- + && (c) != '\\' \
- + && (c) != '"' \
- + && (c) != '.' \
- + && (c) != '[' \
- + && (c) != ']')
- +
- + #define istoken(c) \
- + (!isspace (c) \
- + && !iscntrl (c) \
- + && (c) != '(' \
- + && (c) != ')' \
- + && (c) != '<' \
- + && (c) != '>' \
- + && (c) != '@' \
- + && (c) != ',' \
- + && (c) != ';' \
- + && (c) != ':' \
- + && (c) != '\\' \
- + && (c) != '"' \
- + && (c) != '/' \
- + && (c) != '[' \
- + && (c) != ']' \
- + && (c) != '?' \
- + && (c) != '=')
- +
- + /* MTR: removed now, since likely to go away in the future
- + && (c) != '.' \
- + */
- +
- + /* */
- +
- + #define CPERLIN 76
- + #define BPERLIN (CPERLIN / 4)
- + #define LPERMSG 632
- + #define CPERMSG (LPERMSG * CPERLIN)
- +
- + /* */
- +
- + #if defined(BSD42) || defined(SOCKETS)
- + #define FTP
- + #endif
- *** ../mh-6.7.2/h/mshsbr.h Thu Apr 5 16:04:17 1990
- --- h/mshsbr.h Tue May 12 15:04:02 1992
- ***************
- *** 1,5 ****
- /* mshsbr.h - definitions for msh */
- ! /* @(#)$Id: mshsbr.h,v 1.3 90/04/05 15:06:34 sources Exp $ */
-
- struct Cmd {
- char line[BUFSIZ];
- --- 1,5 ----
- /* mshsbr.h - definitions for msh */
- ! /* @(#)$Id: mshsbr.h,v 1.5 1992/05/12 22:04:01 jromine Exp $ */
-
- struct Cmd {
- char line[BUFSIZ];
- ***************
- *** 29,39 ****
-
- struct tws m_tb;
-
- short m_stats;
- #define CUR (1 << (FFATTRSLOT + NATTRS))
- #ifdef BPOP
- #define VIRTUAL SELECT_EMPTY
- ! #endif BPOP
- };
-
- /* */
- --- 29,43 ----
-
- struct tws m_tb;
-
- + short m_flags;
- + #define MHNCHK 0x0001 /* did nontext check */
- + #define MHNYES 0x0002 /* .. and known to be non-text */
- +
- short m_stats;
- #define CUR (1 << (FFATTRSLOT + NATTRS))
- #ifdef BPOP
- #define VIRTUAL SELECT_EMPTY
- ! #endif /* BPOP */
- };
-
- /* */
- ***************
- *** 71,77 ****
- #ifdef BSD42
- extern int should_intr; /* signal handler should interrupt call */
- extern jmp_buf sigenv; /* the environment pointer */
- ! #endif BSD42
-
-
- long lseek ();
- --- 75,81 ----
- #ifdef BSD42
- extern int should_intr; /* signal handler should interrupt call */
- extern jmp_buf sigenv; /* the environment pointer */
- ! #endif /* BSD42 */
-
-
- long lseek ();
- *** ../mh-6.7.2/h/rcvmail.h Thu Oct 29 14:56:16 1987
- --- h/rcvmail.h Mon Dec 14 16:20:23 1992
- ***************
- *** 1,4 ****
- --- 1,5 ----
- /* rcvmail.h - rcvmail hook definitions */
- + /* @(#)$Id: rcvmail.h,v 1.3 1992/12/15 00:20:22 jromine Exp $ */
-
- #ifndef MMDFMTS
- #include <ctype.h>
- ***************
- *** 7,25 ****
- #include <stdio.h>
- #include <sys/types.h>
- #include "../mts/sendmail/smail.h"
- ! #else MMDFMTS
- #include "../mts/mmdf/util.h"
- #include "../mts/mmdf/mmdf.h"
- ! #endif MMDFMTS
-
-
- #ifndef MMDFI
- #define RCV_MOK 0
- #define RCV_MBX 1
- ! #else MMDFI
- #define RCV_MOK RP_MOK
- #define RCV_MBX RP_MECH
- ! #endif MMDFI
-
-
- #ifdef NRTC /* sigh */
- --- 8,26 ----
- #include <stdio.h>
- #include <sys/types.h>
- #include "../mts/sendmail/smail.h"
- ! #else /* MMDFMTS */
- #include "../mts/mmdf/util.h"
- #include "../mts/mmdf/mmdf.h"
- ! #endif /* MMDFMTS */
-
-
- #ifndef MMDFI
- #define RCV_MOK 0
- #define RCV_MBX 1
- ! #else /* MMDFI */
- #define RCV_MOK RP_MOK
- #define RCV_MBX RP_MECH
- ! #endif /* MMDFI */
-
-
- #ifdef NRTC /* sigh */
- ***************
- *** 28,31 ****
-
- #define RCV_MOK RP_MOK
- #define RCV_MBX RP_MECH
- ! #endif NRTC
- --- 29,32 ----
-
- #define RCV_MOK RP_MOK
- #define RCV_MBX RP_MECH
- ! #endif /* NRTC */
- *** ../mh-6.7.2/h/scansbr.h Mon Dec 2 12:45:58 1991
- --- h/scansbr.h Tue Nov 10 09:27:14 1992
- ***************
- *** 1,5 ****
- /* scansbr.h - definitions for scan () */
- ! /* $Header: /i1/db3/src/bs/mh-develop/mh-6.7-new/h/RCS/scansbr.h,v 1.2 1991/12/02 20:45:51 jromine Exp $ */
-
- extern char *scanl;
-
- --- 1,5 ----
- /* scansbr.h - definitions for scan () */
- ! /* $Id: scansbr.h,v 1.7 1992/11/10 17:27:11 jromine Exp $ */
-
- extern char *scanl;
-
- ***************
- *** 8,28 ****
- #define SCNEOF 0 /* empty message */
- #define SCNERR (-1) /* error message */
- #define SCNNUM (-2) /* number out of range */
-
-
- #ifndef UK
- #define FORMAT \
- ! "%4(msg)%<(cur)+%| %>%<{replied}-%|%<{encrypted}E%| %>%>\
- %02(mon{date})/%02(mday{date})%<{date} %|*%>\
- ! %<(mymbox{from})To:%14(friendly{to})%|%17(friendly{from})%> \
- %{subject}%<{body}<<%{body}>>%>\n"
- ! #else UK
- #define FORMAT \
- ! "%4(msg)%<(cur)+%| %>%<{replied}-%|%<{encrypted}E%| %>%>\
- %02(mday{date})/%02(mon{date})%<{date} %|*%>\
- ! %<(mymbox{from})To:%14(friendly{to})%|%17(friendly{from})%> \
- %{subject}%<{body}<<%{body}>>%>\n"
- ! #endif UK
-
- #define WIDTH 78
-
- --- 8,29 ----
- #define SCNEOF 0 /* empty message */
- #define SCNERR (-1) /* error message */
- #define SCNNUM (-2) /* number out of range */
- + #define SCNFAT (-3) /* fatal error */
-
-
- #ifndef UK
- #define FORMAT \
- ! "%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
- %02(mon{date})/%02(mday{date})%<{date} %|*%>\
- ! %<(mymbox{from})%<{to}To:%14(friendly{to})%>%>%<(zero)%17(friendly{from})%> \
- %{subject}%<{body}<<%{body}>>%>\n"
- ! #else /* UK */
- #define FORMAT \
- ! "%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
- %02(mday{date})/%02(mon{date})%<{date} %|*%>\
- ! %<(mymbox{from})%<{to}To:%14(friendly{to})%>%>%<(zero)%17(friendly{from})%> \
- %{subject}%<{body}<<%{body}>>%>\n"
- ! #endif /* UK */
-
- #define WIDTH 78
-
- *** ../mh-6.7.2/h/strings.h Thu Jan 23 15:16:49 1992
- --- h/strings.h Thu Nov 12 11:34:32 1992
- ***************
- *** 1,14 ****
- /* strings.h - define standard string functions */
- ! /* @(#)$Id: strings.h,v 1.8 1992/01/23 23:16:46 jromine Exp $ */
-
- #ifndef _STRINGS /* once-only... */
- #define _STRINGS
-
- #ifdef SYS5
- #define index strchr
- #define rindex strrchr
- ! #endif SYS5
-
- char *index ();
- char *mktemp ();
- char *rindex ();
- --- 1,37 ----
- /* strings.h - define standard string functions */
- ! /* @(#)$Id: strings.h,v 1.18 1992/11/12 19:34:05 jromine Exp $ */
-
- #ifndef _STRINGS /* once-only... */
- #define _STRINGS
-
- + #ifdef AUX
- + #include <stdlib.h>
- + #endif
- +
- + #ifdef _AIX
- + #include <string.h>
- + #include <stdlib.h>
- +
- + #define bcmp(b1,b2,length) memcmp(b1, b2, length)
- + #define bcopy(b1,b2,length) (void) memcpy (b2, b1, length)
- + #define bcpy(b1,b2,length) memcmp (b1, b2, length)
- + #define bzero(b,length) (void) memset (b, 0, length)
- +
- + #else /* _AIX */
- +
- #ifdef SYS5
- #define index strchr
- #define rindex strrchr
- ! #endif /* SYS5 */
-
- + #if defined(BSD42) || defined(SVR4)
- + #ifndef SVR4
- + #include <strings.h>
- + #else
- + #include <string.h>
- + #include <stdlib.h>
- + #endif
- + #else /* not BSD42 || SVR4 */
- char *index ();
- char *mktemp ();
- char *rindex ();
- ***************
- *** 26,35 ****
- --- 49,65 ----
- char *strncat ();
- int strncmp ();
- char *strncpy ();
- + #endif
-
- + #ifndef SVR4
- char *getenv ();
- char *calloc (), *malloc (), *realloc ();
- + #endif /* SVR4 */
-
- + #if defined(__HIGHC__) || __GNUC__ == 2
- + #define bcopy(s,d,l) memcpy(d,s,l)
- + #endif
- +
- #ifdef SYS5
- #include <memory.h>
- #define bcmp(b1,b2,length) memcmp(b1, b2, length)
- ***************
- *** 36,41 ****
- #define bcopy(b1,b2,length) (void) memcpy (b2, b1, length)
- #define bcpy(b1,b2,length) memcmp (b1, b2, length)
- #define bzero(b,length) (void) memset (b, 0, length)
- ! #endif SYS5
- !
- ! #endif not _STRINGS
- --- 66,71 ----
- #define bcopy(b1,b2,length) (void) memcpy (b2, b1, length)
- #define bcpy(b1,b2,length) memcmp (b1, b2, length)
- #define bzero(b,length) (void) memset (b, 0, length)
- ! #endif /* SYS5 */
- ! #endif /* _AIX */
- ! #endif /* not _STRINGS */
- *** ../mh-6.7.2/miscellany/README Fri Apr 6 11:24:13 1990
- --- miscellany/README Thu Dec 3 14:59:31 1992
- ***************
- *** 1,4 ****
- ! miscellany/README $Revision: 1.3 $ $Date: 90/04/06 11:24:12 $
-
- ! This directory contains some useful things for MH users and installers.
-
- --- 1,5 ----
- ! $Id: README,v 1.8 1992/11/20 17:05:30 jromine Exp $
-
- ! The "miscellany/" directory contains some useful things for MH
- ! users and installers.
-
- ***************
- *** 7,10 ****
- compress-4.0 MH Patches are sent out compressed.
- ! less-5.0 "less is more" - a more/pg-like pager (v5)
- ! patch-2.0.12 The famous patch program. MH updates are sent as patches.
-
- --- 8,11 ----
- compress-4.0 MH Patches are sent out compressed.
- ! less-177 "less is more" - a more/pg-like pager (ver. 177)
- ! patch-2.0.12u8 The famous patch program. MH updates are sent as patches.
-
- ***************
- *** 12,13 ****
- --- 13,15 ----
-
- + audit A perl package to parse and process messages
- convert Utilities for converting to/from other mailbox formats.
- ***************
- *** 14,22 ****
- libndir The new directory routines for sites that don't have them.
- ! mem A reminder system.
- ! mh-e Brian Reid's MHE system
- ! mhe GNU Emacs interface to MH
- mtrenv Some of Marshall T. Rose's MH environment
- netnews Making netnews directories MH folders under 4BSD
- ! rcvtrip A script mhook.
- scripts Some useful scripts
- sortf Sort a folder by arbitrary fields (for MH6.6)
- --- 16,28 ----
- libndir The new directory routines for sites that don't have them.
- ! mem A reminder system using an appointment folder.
- ! mh-e GNU Emacs interface to MH (probably not the newest version)
- ! mhe Brian Reid's MHE system
- mtrenv Some of Marshall T. Rose's MH environment
- + multi-media Multi-media mail as specified by RFC 1341 (MIME)
- netnews Making netnews directories MH folders under 4BSD
- ! rcvtrip A script mhook which will annoy all posters of
- ! mailing lists the user might be on.
- scripts Some useful scripts
- + sendmail A replacement local mailer which uses the MMDF
- + maildrop format
- sortf Sort a folder by arbitrary fields (for MH6.6)
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- miscellany/multi-media/READ-ME Mon Oct 26 08:57:54 1992
- ***************
- *** 0 ****
- --- 1,257 ----
- + $Id: READ-ME,v 1.3 1992/10/26 16:57:51 jromine Exp $
- +
- + [ READ-ME - Wed Oct 21 15:35:57 1992 - multi-media MH for MH 6.7 - /mtr ]
- +
- +
- + NOTICE
- +
- + This package is openly available but is NOT in the public domain.
- + You are allowed and encouraged to take this software and use it for
- + any lawful purpose. However, as a condition of use, you are required
- + to "hold harmless" all contributors.
- +
- + Permission to use, copy, modify, and distribute this software and
- + its documentation for any purpose and without fee is hereby
- + granted, provided that this notice be retained unaltered, and that
- + the name of any contributors shall not be used in advertising or
- + publicity pertaining to distribution of the software without
- + specific written prior permission. No contributor makes any
- + representations about the suitability of this software for any
- + purpose. It is provided "as is" without express or implied
- + warranty.
- +
- + ALL CONTRIBUTORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- + AND FITNESS FOR THE PARTICULAR PURPOSE, TITLE, AND
- + NON-INFRINGEMENT.
- +
- + IN NO EVENT SHALL ANY CONTRIBUTOR BE LIABLE FOR ANY SPECIAL,
- + INDIRECT OR CONSEQUENTIAL DAMAGES, WHETHER IN CONTRACT, TORT, OR
- + OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH, THE
- + USE OR PERFORMANCE OF THIS SOFTWARE.
- +
- +
- + Following are sources of software for manipulating various MIME content
- + types. The script support/general/bootmhn.sh (which is run when
- + you do "make inst-all") will look for these programs and create the
- + global mhn_defaults file accordingly. Since this script will
- + look for the programs detailed below, you should do all of the
- + installation here prior to running "make inst-all". Also, the
- + programs should be installed in either the MH library area
- + (e.g., /usr/local/lib/mh/) or in your $PATH.
- +
- +
- + text/richtext
- +
- + There are two programs for rendering text/richtext, rt2raw and
- + richtext.
- +
- + 1. r2raw - a really dumb richtext interpreter
- +
- + This is found in the MH distribution:
- +
- + % cd miscellany/multi-media/misc/
- + % cc -o rt2raw rt2raw.c
- +
- + and then copy rt2raw to your MH library area.
- +
- +
- + 2. richtext - a termcap-based interpreter
- +
- + This is found in the MetaMail distribution:
- +
- + host thumper.bellcore.com
- + dir pub/nsb/
- + file mm.tar.Z
- + mode binary
- +
- + Now run these commands
- +
- + % mkdir mm
- + % cd mm
- + % uncompress < ../mm.tar.Z | tar xvpf -
- + % cd richmail
- + % make richtext
- +
- + and then copy richtext to your MH library area.
- +
- +
- + image
- +
- + There are several programs available for rending images: xv, pbmplus,
- + and jpeg. To use any of these, you need to be running under the
- + X window system. When bootmhn.sh runs, it will generate commands
- + for a monochrome monitor. If you're running on a greyscale or
- + color monitor, you should change the commands accordingly.
- +
- + 1. xv version 2.11
- +
- + There may be a more recent version by the time you read this file:
- +
- + host ftp.cis.upenn.edu
- + dir pub/
- + file xv-2.11.tar.Z
- + mode binary
- +
- + Read the installation instructions and install the xv binary
- + somewhere in your $PATH.
- +
- + 2. pbmplus
- +
- + There may be a more recent version by the time you read this file:
- +
- + host ftp.uu.net
- + dir pub/window-sys/X/contrib
- + file pbmplus10dec91.tar.Z
- + mode binary
- +
- + 3. JPEG
- +
- + There may be a more recent version by the time you read this file:
- +
- + host ftp.uu.net
- + dir graphics/jpeg/
- + file jpegsrc.v3.tar.Z
- + mode binary
- +
- + Read the installation instructions and install the djpeg binary
- + somewhere in your $PATH.
- +
- +
- + audio
- +
- + This is platform dependent. At present, only detailed information
- + for the SPARC and the HP 9000/710 is presented.
- +
- + 1. SPARC
- +
- + The SPARC has a telephone-quality audio-chip and an internal
- + speaker. If you want to record audio, you'll need to buy a
- + microphone. For reasons not worth going into, most mic's don't
- + have enough gain, and you have to put the thing right next to your
- + lips. However, Isaac Salzman of SMI suggests, and I concur, that
- + the best mic to get is SONY's ECM-K7. This costs about US$50, but
- + is well worth it: you can put the mic on your desk and it will
- + still pick up your voice.
- +
- + The "native" encoding for the audio-chip is 8-bit u-law sampled at
- + 8000/second . Prior to SunOS 4.1, audio files contained simply the
- + encoded audio. However, in SunOS 4.1 or later, SMI introduced a
- + file format containing a header followed by the encoded audio. For
- + now, we'll use the content type audio/basic to refer to the raw
- + audio, and the content type audio/x-next to refer to the file
- + format (NeXT developed the file format and SMI supports a subset of
- + it). When dealing audio/basic, you simply cat to/from /dev/audio.
- + When dealing with audio/x-next, you can use the play and record
- + programs found in the /usr/demo/SOUND/ directory.
- +
- + In addition, in OpenWindows 3.0 or later, SMI added support for a
- + compressed u-law encoding based on the CCITT G.721 ADPCM algorithm.
- + Before audio encoded in this fashion can be heard, it must be
- + converted back to 8-bit u-law. Conversions to and from the two
- + encodings can be done with the adpcm_enc and adpcm_dec programs
- + found in the $OPENWINHOME/bin/xview/ directory.
- +
- + If you are running something earlier than SunOS 4.1, I suggest that
- + you immediately get a copy of the raw2audio, play, and record
- + programs, so you can generate audio files. The source is avilable
- + in the SunOS 4.1 Demos installation. If you can't find these
- + programs, then when bootmhn.sh runs, it will just cat directly
- + to/from /dev/audio.
- +
- + If you do have the raw2audio, play, and record programs (regardless
- + of the version of SunOS you're running), then apply some patches:
- +
- + % (cd /usr/demo/SOUND; patch) < miscellany/multi-media/SPARC/SOUND.diff
- + % cd /usr/demo/SOUND
- + % make raw2audio
- +
- + Be sure to put /usr/demo/SOUND in your $PATH so that bootmhn.sh can
- + find the programs there. (Alternately, you could copy these
- + programs to another directory which is in your $PATH.)
- +
- + You might also consider running /usr/demo/SOUND/x_gaintool, so you
- + can fiddle with the volume controls whenever you like.
- +
- + 2. HP 9000/710
- +
- + The HP-Apollo 9000/710 workstation has a telephone-quality audio
- + chip and an internal speaker. If you want to record audio, you'll
- + need to buy a microphone. As with the SPARC, just about any
- + microphone with a standard mini jack will do. Comments in the
- + preceding section that apply to selections of a microphone for the
- + SPARC probably also apply here.
- +
- + The audio programs that may be used with mhn -- player, splayer,
- + recorder, and srecorder -- are provided by HP in source form in the
- + directory /usr/audio/examples/. The README file in that directory
- + documents the various audio utility programs for recording and
- + playing sounds. Be sure to put /usr/audio/examples in your $PATH
- + so that bootmhn.sh can find the programs there. (Alternately, you
- + could copy these programs to another directory which is in your
- + $PATH.)
- +
- + Before any of the aforementioned programs can be used, the audio
- + device files must be created by running
- + /usr/audio/bin/make_audio_dev, and two daemons must be started:
- + /usr/etc/ncs/llbd and /usr/audio/bin/Aserver. Refer to Audio(5)
- + for detailed, step by step instructions on how to do these things.
- + Alternatively, refer to the HP publication "Audio Users Guide"
- + (HP order number A1991-90609, November 1991 version).
- +
- + The audio devices support several "native" encodings that vary as
- + to which of the audio device files is used: one of
- + /dev/audio[BEI][ALU], where E=external jack, I=internal speaker,
- + B=both; A=8-bit ALaw, L=16-bit linear, U=8-bit MuLaw. It is
- + possible to "cat" a raw audio data file of the appropriate type to
- + or from one of these devices. For example, a SPARC .au file may be
- + played by running this command:
- +
- + cat bark.au >/dev/audioIU
- +
- + (You must create the audio device files before you can cat anything
- + to them; again, refer to Audio(5) for information on how to do this.)
- +
- + There is, as of HP-UX 8.07, no supplied tool a la the SPARC's raw2audio
- + to add headers to audio data files that describe the audio data
- + encodings. Rather than looking for headers in the sound data, the
- + audio tools rely on user-supplied information, such as file
- + extensions or command line options, to inform the tools about the
- + types and sampling rates of the audio data.
- +
- + Audio file names have the form
- +
- + <file name>[["."<sample rate>]"."<type>]
- +
- + where
- +
- + <sample rate> ::= 1#DIGIT"000"/ 1#DIGIT"k"
- + <type> ::= "u" / "al" / "au" / "wav" / "snd" / "l8" /
- + "lo8" / "l16"
- +
- + Mulaw u
- + Alaw al
- + Sun au
- + Microsoft RIFF Waveform wav
- + Macintosh snd
- + Linear8 l8
- + Linear8Offset lo8
- + Linear16 l16
- +
- + Examples:
- +
- + bark.au
- + bark.8000.au
- + bark.8k.au
- +
- + As with the SPARC, the default sample rate is 8000 Hz.
- +
- + The /usr/audio/bin/audio_demo program may be used to convert
- + manually among different sound types, as well as to play, to
- + record, and to edit the sounds. Unfortunately, the audio_demo
- + program does not accept command line arguments, so it is not quite
- + as suitable for invocation from mhn as are the player and recorder
- + programs.
- +
- + You might also consider running /usr/audio/examples/acontrol, so you
- + can fiddle with the volume controls whenever you like.
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- miscellany/multi-media/SPARC/SOUND.diff Fri Feb 21 16:10:47 1992
- ***************
- *** 0 ****
- --- 1,99 ----
- + *** :raw2audio.c Thu Oct 11 13:12:39 1990
- + --- raw2audio.c Fri Nov 1 17:20:00 1991
- + ***************
- + *** 23,29 ****
- + /* Local variables */
- + char *prog;
- + char prog_desc[] = "Convert raw data to audio file format";
- + ! char prog_opts[] = "o:s:p:e:c:i:f?"; /* getopt() flags */
- +
- + char *Stdin = "stdin";
- + char *Stdout = "stdout";
- + --- 23,29 ----
- + /* Local variables */
- + char *prog;
- + char prog_desc[] = "Convert raw data to audio file format";
- + ! char prog_opts[] = "o:s:p:e:c:i:fF?"; /* getopt() flags */
- +
- + char *Stdin = "stdin";
- + char *Stdout = "stdout";
- + ***************
- + *** 34,39 ****
- + --- 34,40 ----
- + char *Info = NULL; /* pointer to info data */
- + unsigned Ilen = 0; /* length of info data */
- + int Force = 0; /* rewrite file header, if present */
- + + int Strip = 0; /* strip header */
- + unsigned Offset = 0; /* byte offset into raw data */
- + Audio_hdr Hdr; /* audio header structure */
- + char *ofile; /* output temporary file name */
- + ***************
- + *** 139,144 ****
- + --- 140,148 ----
- + Info = optarg; /* set information string */
- + Ilen = strlen(Info);
- + break;
- + + case 'F':
- + + Strip++; /* strip header */
- + + /* and fall... */
- + case 'f':
- + Force++; /* force header rewrite */
- + break;
- + ***************
- + *** 161,166 ****
- + --- 165,174 ----
- + if (Hdr.bytes_per_unit < 4)
- + err++;
- + break;
- + + case AUDIO_ENCODING_ADPCM:
- + + if (Hdr.bytes_per_unit != 1)
- + + err++;
- + + break;
- + }
- + if (err > 0) {
- + Error(stderr, "%s: encoding/precision mismatch\n",
- + ***************
- + *** 317,322 ****
- + --- 325,331 ----
- + /* Write the audio file header first. */
- + if (Hdr.data_size != AUDIO_UNKNOWN_SIZE)
- + Hdr.data_size -= Offset;
- + + if (Strip) goto copydata;
- + err = audio_write_filehdr(ofd, &Hdr, Info, Ilen);
- + if (err != AUDIO_SUCCESS)
- + goto writeerror;
- + ***************
- + *** 435,443 ****
- + *dst = AUDIO_ENCODING_LINEAR;
- + else if (strncmp(str, "FLOAT", i) == 0)
- + *dst = AUDIO_ENCODING_FLOAT;
- + else {
- + Error(stderr,
- + ! "%s: encoding must be one of: ULAW, LINEAR, FLOAT\n", prog);
- + return (1);
- + }
- + return (0);
- + --- 444,454 ----
- + *dst = AUDIO_ENCODING_LINEAR;
- + else if (strncmp(str, "FLOAT", i) == 0)
- + *dst = AUDIO_ENCODING_FLOAT;
- + + else if (strncmp(str, "ADPCM", i) == 0)
- + + *dst = AUDIO_ENCODING_ADPCM;
- + else {
- + Error(stderr,
- + ! "%s: encoding must be one of: ULAW, LINEAR, FLOAT, ADPCM\n", prog);
- + return (1);
- + }
- + return (0);
- + *** multimedia/:audio_hdr.h Thu Oct 11 13:12:45 1990
- + --- multimedia/audio_hdr.h Fri Nov 1 09:47:12 1991
- + ***************
- + *** 72,77 ****
- + --- 72,78 ----
- + #define AUDIO_ENCODING_ALAW (2) /* ISDN A-law */
- + #define AUDIO_ENCODING_LINEAR (3) /* PCM 2's-complement (0-center) */
- + #define AUDIO_ENCODING_FLOAT (4) /* IEEE float (-1. <-> +1.) */
- + + #define AUDIO_ENCODING_ADPCM (23) /* CCITT G.721*/
- +
- +
- + /* Value used for indeterminate size (e.g., data passed through a pipe) */
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- miscellany/multi-media/misc/rt2raw.c Fri Feb 21 16:10:49 1992
- ***************
- *** 0 ****
- --- 1,55 ----
- + /* taken straight from the MIME specification, to use with multi-media MH, do:
- +
- + mhn-show-text/richtext: rt2raw < %f | fmt -78 | more
- +
- + in your .mhn_profile.
- +
- + Note that MTR doesn't use this program. He uses NB's richtext program
- + instead (the one that comes with MetaMail). See RICHTEXT.setup for the
- + details.
- + */
- +
- + #include <stdio.h>
- + #include <ctype.h>
- + main() {
- + int c, i;
- + char token[50];
- +
- + while((c = getc(stdin)) != EOF) {
- + if (c == '<') {
- + for (i=0; (c = getc(stdin)) != '>'
- + && c != EOF; ++i) {
- + token[i] = isupper(c) ? tolower(c) : c;
- + }
- + if (c == EOF) break;
- + token[i] = NULL;
- + if (!strcmp(token, "lt")) {
- + putc('<', stdout);
- + } else if (!strcmp(token, "nl")) {
- + putc('\n', stdout);
- + } else if (!strcmp(token, "/paragraph")) {
- + puts("\n\n", stdout);
- + } else if (!strcmp(token, "comment")) {
- + int commct=1;
- + while (commct > 0) {
- + while ((c = getc(stdin)) != '<'
- + && c != EOF) ;
- + if (c == EOF) break;
- + for (i=0; (c = getc(stdin)) != '>'
- + && c != EOF; ++i) {
- + token[i] = isupper(c) ?
- + tolower(c) : c;
- + }
- + if (c== EOF) break;
- + token[i] = NULL;
- + if (!strcmp(token, "/comment")) --commct;
- + if (!strcmp(token, "comment")) ++commct;
- + }
- + } /* Ignore all other tokens */
- + } else if (c != '\n') {
- + putc(c, stdout);
- + }
- + }
- + putc('\n', stdout); /* for good measure */
- + exit(0);
- + }
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- miscellany/multi-media/misc/showtimes.sh Mon Apr 27 14:39:57 1992
- ***************
- *** 0 ****
- --- 1,94 ----
- + : run this script through /bin/sh
- +
- + C=/tmp/st$$.ctx L=/tmp/st$$.lst P=/tmp/st$$.prf
- +
- + trap "rm -f $C $L $P" 0 1 2 3 13 15
- +
- + echo "MH-Sequences:" > $P
- + cat ${MH-$HOME/.mh_profile} >> $P
- + MH="$P" export MH
- + cp ${MHCONTEXT-`mhpath +`/context} $C
- + MHCONTEXT="$C" export MHCONTEXT
- +
- + F= M= N=
- + for A in $*
- + do
- + case "$A" in
- + -file) if [ ! -z "$F" -o ! -z "$M" ]; then
- + echo "st: do not mix files and messages" 1>&2
- + exit 1
- + fi
- + F="-file" N="file "
- + ;;
- +
- + +*|@*) if [ ! -z "$F" ]; then
- + echo "st: only one folder at a time" 1>&2
- + exit 1
- + fi
- + F="$A" N="$F:"
- + ;;
- +
- + *) if [ ! -z "$M" ]; then
- + echo "st: only one message at a time" 1>&2
- + exit 1
- + fi
- + M="$A"
- + ;;
- + esac
- + done
- +
- + if mhn -list $F $M > $L; then
- + if [ -z "$F" ]; then
- + N="+`folder -fast`:"
- + fi
- + if [ -z "$M" ]; then
- + M="`mhpath cur`"
- + M="`basename $M`"
- + fi
- + else
- + exit 1;
- + fi
- +
- + cat $L
- +
- + X=0 Y=0
- + Z=`xdpyinfo | fgrep 'dimensions:'| awk '{ print $2; }'`
- + XX="`echo $Z | sed -e 's%\(.*\)x.*%\1%'`"
- + YY="`echo $Z | sed -e 's%.*x\(.*\)%\1%'`"
- + XX="`expr \( $XX \* 5 \) / 12`"
- + YY="`expr \( $YY \* 2 \) / 3`"
- +
- + echo -n "st> "
- + while read A; do
- + case "$A" in
- + [123456789]*|0)
- + O="`fgrep \ $A\ $L | sed -e 's%..........................................\(.*\)%\1%'`"
- + if [ -z "$O" ]; then
- + echo "no such part number"
- + else
- + xterm -geometry =80x20+$X+$Y \
- + -title "$O (part $A of $N$M)" -e \
- + mhn -nolist -show -part "$A" $F $M &
- +
- + X=`expr $X + 90` Y=`expr $Y + 60`
- + if [ $X -gt $XX ]; then
- + X=0
- + fi
- + if [ $Y -gt $YY ]; then
- + Y=0
- + fi
- + fi
- + ;;
- +
- + list|"")
- + cat $L
- + ;;
- +
- + *) echo "enter part number to display"
- + ;;
- + esac
- + echo -n "st> "
- + done
- + echo ""
- +
- + exit 0
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- miscellany/multi-media/profiles/mhn_defaults Thu Dec 10 14:45:28 1992
- ***************
- *** 0 ****
- --- 1,12 ----
- + mhn-compose-audio/basic: /usr/demo/SOUND/record | /usr/demo/SOUND/raw2audio -F
- + mhn-compose-audio/x-next: /usr/demo/SOUND/record | /usr/openwin/bin/adpcm_enc
- + mhn-charset-iso-8859-1: xterm -fn '-*-*-medium-r-normal-*-*-120-*-*-c-*-iso8859-*' -e %s
- + mhn-show-application/PostScript: %plpr -Pps
- + mhn-show-audio/basic: %p/usr/demo/SOUND/raw2audio 2>/dev/null | play
- + mhn-show-audio/x-next: %p/usr/openwin/bin/adpcm_dec | /usr/demo/SOUND/play
- + mhn-show-image: %pxv -geometry =-0+0 %f
- + mhn-show-text/richtext: %p/usr/local/lib/mh/richtext -p %F
- + mhn-store-application/PostScript: %m%P.ps
- + mhn-store-audio/basic: | /usr/demo/SOUND/raw2audio -e ulaw -s 8000 -c 1 > %m%P.au
- + mhn-store-audio/x-next: %m%P.au
- + mhn-store-text: %m%P.txt
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- miscellany/multi-media/profiles/mtr.mh_profile Sat Oct 17 22:40:07 1992
- ***************
- *** 0 ****
- --- 1,59 ----
- + Path: mhbox
- + Alternate-Mailboxes: mrose*
- + Draft-Folder: drafts
- + Folder-Protect: 700
- + Msg-Protect: 600
- + Sequence-Negation: ^
- + lproc: show
- + moreproc: less
- + mshproc: msh
- + showproc: mhl
- + ex-next: zz
- + prompter-next: vi
- + da-server: wp2.psi.net
- + ali: -alias aliases
- + anno: -inplace
- + bomb: -annotate -fcc +outbox -form repl.bomb -inplace -nocc all
- + -whatnow push
- + burst: -inplace
- + dist: -annotate -form dist.comps -inplace
- + forw: -annotate -editor rapid -form forw.comps -inplace -mime
- + fym: -annotate -fcc +outbox -form repl.fym -inplace -nocc all
- + -whatnow push -filter mhl.fym
- + hnfy: -annotate -fcc +outbox -form repl.hnfy -inplace -nocc all
- + -whatnow push
- + inc: -apop -form scan.time
- + msgchk: -apop
- + msh: -scan -topcur
- + next: -noheader
- + ok: -annotate -fcc +outbox -form repl.ok -inplace -nocc all
- + -whatnow push
- + oops: -annotate -fcc +outbox -form repl.oops -inplace -nocc all
- + -whatnow push
- + pick: -sequence select -list
- + pop: -rpop -form scan.timely
- + popi: -apop
- + popf: -pop
- + prev: -noheader
- + push: -alias aliases -forward -mime -msgid -push -verbose
- + pushf: -push
- + rapid: -rapid
- + repl: -annotate -fcc +outbox -inplace -cc all -nocc me
- + scan: -form scan.time
- + send: -alias aliases -mime -msgid -verbose
- + sendf: -alias aliases -mime -msgid -verbose -draftfolder +drafts
- + show: -noheader
- + ssortm: -limit 0 -textfield subject
- + thanks: -annotate -fcc +outbox -form repl.thanks -inplace -nocc all
- + -whatnow push
- + whom: -alias aliases
- + vmh: -novmhproc
- + yl: -annotate -fcc +outbox -form repl.yl -inplace -nocc all
- + -whatnow push
- + Split-Delay: 180
- + automhnproc: mhn
- + mhnproc: mhn
- + mcomp: -editor rapid -form comp.mhn
- + mhn: -list -nomoreproc
- + mhn-cache: /tmp
- + mhn-storage: /tmp
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- miscellany/multi-media/profiles/mtr.mhn_profile.openwindows Sat Oct 17 22:39:44 1992
- ***************
- *** 0 ****
- --- 1 ----
- + mhn-show-application/PostScript: pageview -
- No differences encountered
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- miscellany/sendmail/README Thu Nov 5 19:40:56 1992
- ***************
- *** 0 ****
- --- 1,8 ----
- + # miscellany/sendmail/README
- +
- + spooler.c -- a replacement local delivery mailer for sendmail that
- + was written by Terry West (terry@rand.org) and has been
- + in use there for many years now.
- +
- + It writes maildrops in the MMDF/MH ctrl/A format so you
- + can avoid munging "From " lines.
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- miscellany/sendmail/spooler.c Thu Nov 5 14:28:52 1992
- ***************
- *** 0 ****
- --- 1,204 ----
- + /* spooler.c -- MH style mailer to write to /usr/spool/mail/<user>
- + *
- + * Mlocal, P=/etc/spooler, F=lsDFSmn, S=10, R=20, A=spooler $u
- + */
- +
- +
- + #define FLOCK /* uses flock() if defined, lockf() otherwise. */
- +
- + #include <stdio.h>
- + #include <sys/types.h>
- + #include <sys/stat.h>
- + #include <sys/file.h>
- + #include <pwd.h>
- + #include "sysexits.h"
- +
- + #define SPOOLDIR "/usr/spool/mail"
- +
- + char *delim = "\1\1\1\1\n";
- + char *ME = "/etc/spooler";
- +
- + FILE *mboxopen();
- + FILE *fp_in;
- +
- + main( argc, argv )
- + int argc;
- + char **argv;
- + {
- + register int rc, anyerrs;
- + char tmpfile[100];
- +
- + if( *++argv == NULL ) {
- + fprintf( stderr, "%s: no recipients.\n", ME );
- + exit( EX_USAGE );
- + }
- +
- + if( argc == 2 ) { /* single recipient, don't need tmp copy */
- + fp_in = stdin;
- + rc = localmail( *argv );
- + }
- + else {
- + if(( rc = copyfile( tmpfile )) == 0 ) { /* sets fp_in */
- + for( anyerrs = 0; *argv; argv++ ) {
- + rewind( fp_in );
- + if(( rc = localmail( *argv )))
- + anyerrs++;
- + }
- + if( !anyerrs )
- + unlink( tmpfile );
- + }
- + }
- +
- + exit( rc );
- + }
- +
- +
- +
- + localmail( user )
- + char *user;
- + {
- + register FILE *fp;
- + register int count, n;
- + register char buf[BUFSIZ];
- + register char mailbox[BUFSIZ];
- + register struct stat sb;
- +
- + sprintf( mailbox, "%s/%s", SPOOLDIR, user );
- +
- + if( stat( mailbox, &sb ) == -1 ) {
- + if( create_mbox( mailbox, user ))
- + return(EX_TEMPFAIL);
- + }
- +
- + if(( fp = mboxopen( mailbox )) == 0 )
- + return(EX_TEMPFAIL);
- + fwrite( delim, sizeof(char), strlen(delim), fp );
- + while(( count = fread( buf, sizeof(char), BUFSIZ, fp_in))) {
- + n = fwrite( buf, sizeof(char), count, fp );
- + if( n != count ) {
- + fprintf( stderr, "%s write error: %d read, %d written\n",
- + ME, count, n );
- + mboxclose(fp);
- + return(-1);
- + }
- + }
- + fwrite( delim, sizeof(char), strlen(delim), fp );
- + mboxclose(fp);
- +
- + return(0);
- + }
- +
- +
- + create_mbox( mbox, user )
- + register char *mbox, *user;
- + {
- + register int fd;
- + register struct passwd *pw;
- +
- + if(( fd = creat( mbox, 0600 )) == -1 )
- + return -1;
- + if(( pw = getpwnam( user )) != NULL ) {
- + fchown( fd, pw->pw_uid, pw->pw_gid );
- + }
- + close( fd );
- +
- + return 0;
- + }
- +
- +
- + FILE *
- + mboxopen( mailbox )
- + register char *mailbox;
- + {
- + register FILE *fp;
- + register int i;
- +
- + if(( fp = fopen( mailbox, "a" )) == NULL ) {
- + fprintf( stderr, "%s: Can't open %s for appending\n", ME, mailbox );
- + return(0);
- + }
- +
- + /* lock the mailbox */
- +
- + #define NLOCKTRYS 20 /* almost a 2 min. wait should be enough even */
- + /* after a long vacation */
- +
- + for( i = 0; i < NLOCKTRYS; i++ ) {
- + #ifdef FLOCK
- + if( flock( fileno(fp), LOCK_EX | LOCK_NB ) == 0) /* got it ok */
- + #else
- + if( lockf( fileno(fp), F_TLOCK, 0) == 0 )
- + #endif FLOCK
- + break;
- + /* fprintf(stderr, "can't lock, sleeping 5 sec...\n"); */
- + sleep(5);
- + }
- + /*
- + * If lockf worked perfectly (ie, rpc.lockd didn't die) this would be
- + * just fine.
- + */
- + #ifdef DontDoThis
- + if( i == NLOCKTRYS ) {
- + fprintf( stderr, "%s: Can't lock %s\n", ME, mailbox);
- + return(0);
- + }
- + #endif
- +
- + fseek( fp, 0, 2 );
- +
- + return(fp);
- + }
- +
- +
- + mboxclose(fp)
- + FILE *fp;
- + {
- + /*todo: unlockit. --not really necessary */
- + fclose(fp);
- + }
- +
- +
- +
- + /*
- + * collect stdin to a tmp file
- + */
- + copyfile( tmpfile )
- + register char *tmpfile;
- + {
- + struct stat sb;
- + register int pid, count, n;
- + register char buf[BUFSIZ];
- + register FILE *fp;
- +
- + pid = getpid();
- +
- + while( 1 ) {
- + sprintf( tmpfile, "/tmp/spooler.%05d", pid );
- + if( stat( tmpfile, &sb ) == -1 ) /* ok, this file doesn't exist */
- + break;
- + pid++;
- + }
- +
- + if(( fp = fopen( tmpfile, "w" )) == NULL ) {
- + fprintf( stderr, "%s: Can't open %s\n", ME, tmpfile );
- + return(EX_TEMPFAIL);
- + }
- +
- + while(( count = fread( buf, sizeof(char), BUFSIZ, stdin ))) {
- + n = fwrite( buf, sizeof(char), count, fp );
- + if( n != count ) {
- + fprintf( stderr, "%s: copyfile, write error: %d read, %d written\n",
- + ME, count, n );
- + fclose(fp);
- + return(-1);
- + }
- + }
- +
- + fp_in = freopen( tmpfile, "r", fp );
- + if( fp_in == NULL ) {
- + fprintf( stderr, "%s: freopen on %s failed\n", ME, tmpfile );
- + return(-1);
- + }
- +
- + return(0);
- + }
- *** ../mh-6.7.2/mts/mh/hosts.c Mon Feb 5 14:51:53 1990
- --- mts/mh/hosts.c Mon Dec 14 16:20:24 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* hosts.c - find out the official name of a host */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: hosts.c,v 1.6 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- /* LINTLIBRARY */
-
- ***************
- *** 5,11 ****
- #undef NETWORK
- #if defined(BSD41A) || defined(BSD42) || defined(SOCKETS)
- #define NETWORK
- ! #endif not (defined(BSD41A) || defined(BSD42) || defined(SOCKETS))
-
- #include "../h/strings.h"
- #include <stdio.h>
- --- 8,14 ----
- #undef NETWORK
- #if defined(BSD41A) || defined(BSD42) || defined(SOCKETS)
- #define NETWORK
- ! #endif /* not (defined(BSD41A) || defined(BSD42) || defined(SOCKETS)) */
-
- #include "../h/strings.h"
- #include <stdio.h>
- ***************
- *** 13,19 ****
- #include <ctype.h>
- #if defined(BSD42) || defined(SOCKETS)
- #include <netdb.h>
- ! #endif BSD42 or SOCKETS
-
-
- #define NOTOK (-1)
- --- 16,22 ----
- #include <ctype.h>
- #if defined(BSD42) || defined(SOCKETS)
- #include <netdb.h>
- ! #endif /* BSD42 or SOCKETS */
-
-
- #define NOTOK (-1)
- ***************
- *** 30,41 ****
- static char buffer[BUFSIZ];
- #if defined(BSD42) || defined(SOCKETS)
- register struct hostent *hp;
- ! #endif BSD42 or SOCKETS
- ! #endif NETWORK
-
- for (p = name, q = site; *p; p++, q++)
- *q = isupper (*p) ? tolower (*p) : *p;
- ! *q = NULL;
- q = site;
-
- if (uleq (LocalName (), site))
- --- 33,44 ----
- static char buffer[BUFSIZ];
- #if defined(BSD42) || defined(SOCKETS)
- register struct hostent *hp;
- ! #endif /* BSD42 or SOCKETS */
- ! #endif /* NETWORK */
-
- for (p = name, q = site; *p; p++, q++)
- *q = isupper (*p) ? tolower (*p) : *p;
- ! *q = 0;
- q = site;
-
- if (uleq (LocalName (), site))
- ***************
- *** 47,59 ****
- free (q);
- return buffer;
- }
- ! #endif BSD41A
- #if defined(BSD42) || defined(SOCKETS)
- if (hp = gethostbyname (q)) {
- (void) strcpy (buffer, hp -> h_name);
- return buffer;
- }
- ! #endif BSD42 or SOCKETS
-
- return NULL;
- }
- --- 50,62 ----
- free (q);
- return buffer;
- }
- ! #endif /* BSD41A */
- #if defined(BSD42) || defined(SOCKETS)
- if (hp = gethostbyname (q)) {
- (void) strcpy (buffer, hp -> h_name);
- return buffer;
- }
- ! #endif /* BSD42 or SOCKETS */
-
- return NULL;
- }
- *** ../mh-6.7.2/mts/mmdf/hosts.c Thu Oct 29 14:58:02 1987
- --- mts/mmdf/hosts.c Mon Dec 14 16:20:24 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* hosts.c - use MMDF to get hostname information */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: hosts.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- /* LINTLIBRARY */
-
- ***************
- *** 8,14 ****
- #include "ch.h"
- #ifdef MMDFII
- #include "dm.h"
- ! #endif MMDFII
- #include "../zotnet/mts.h"
-
- /*
- --- 11,17 ----
- #include "ch.h"
- #ifdef MMDFII
- #include "dm.h"
- ! #endif /* MMDFII */
- #include "../zotnet/mts.h"
-
- /*
- ***************
- *** 36,42 ****
- : ch == (Chan *) NULL ? LocalName ()
- : buffer);
- }
- ! #else MMDFII
-
- extern char *invo_name;
-
- --- 39,45 ----
- : ch == (Chan *) NULL ? LocalName ()
- : buffer);
- }
- ! #else /* MMDFII */
-
- extern char *invo_name;
-
- ***************
- *** 64,67 ****
- return buffer;
- }
- }
- ! #endif MMDFII
- --- 67,70 ----
- return buffer;
- }
- }
- ! #endif /* MMDFII */
- *** ../mh-6.7.2/mts/sendmail/hosts.c Tue Feb 6 12:58:03 1990
- --- mts/sendmail/hosts.c Mon Dec 14 16:20:25 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* hosts.c - find out the official name of a host */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: hosts.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- /* LINTLIBRARY */
-
- ***************
- *** 14,20 ****
- #include <ctype.h>
- #if defined(BSD42) || defined(SOCKETS)
- #include <netdb.h>
- ! #endif BSD42 or SOCKETS
-
-
- #define NOTOK (-1)
- --- 17,23 ----
- #include <ctype.h>
- #if defined(BSD42) || defined(SOCKETS)
- #include <netdb.h>
- ! #endif /* BSD42 or SOCKETS */
-
-
- #define NOTOK (-1)
- ***************
- *** 40,46 ****
- site[BUFSIZ];
- #if defined(BSD42) || defined(SOCKETS)
- register struct hostent *hp;
- ! #endif BSD42 or SOCKETS
- static char buffer[BUFSIZ];
- register char **r;
- register struct host *h;
- --- 43,49 ----
- site[BUFSIZ];
- #if defined(BSD42) || defined(SOCKETS)
- register struct hostent *hp;
- ! #endif /* BSD42 or SOCKETS */
- static char buffer[BUFSIZ];
- register char **r;
- register struct host *h;
- ***************
- *** 47,53 ****
-
- for (p = name, q = site; *p; p++, q++)
- *q = isupper (*p) ? tolower (*p) : *p;
- ! *q = NULL;
- q = site;
-
- if (uleq (LocalName (), site))
- --- 50,56 ----
-
- for (p = name, q = site; *p; p++, q++)
- *q = isupper (*p) ? tolower (*p) : *p;
- ! *q = 0;
- q = site;
-
- if (uleq (LocalName (), site))
- ***************
- *** 59,65 ****
- free (q);
- return buffer;
- }
- ! #endif BSD41A
- #if defined(BSD42) || defined(SOCKETS)
- #ifndef BIND
- sethostent (1);
- --- 62,68 ----
- free (q);
- return buffer;
- }
- ! #endif /* BSD41A */
- #if defined(BSD42) || defined(SOCKETS)
- #ifndef BIND
- sethostent (1);
- ***************
- *** 68,74 ****
- (void) strcpy (buffer, hp -> h_name);
- return buffer;
- }
- ! #endif BSD42 or SOCKETS
-
- if (hosts.h_name || init_hs ())
- for (h = hosts.h_next; h; h = h -> h_next)
- --- 71,77 ----
- (void) strcpy (buffer, hp -> h_name);
- return buffer;
- }
- ! #endif /* BSD42 or SOCKETS */
-
- if (hosts.h_name || init_hs ())
- for (h = hosts.h_next; h; h = h -> h_next)
- ***************
- *** 108,134 ****
- h = &hosts;
- while (fgets (buffer, sizeof buffer, fp) != NULL) {
- if (cp = index (buffer, '#'))
- ! *cp = NULL;
- if (cp = index (buffer, '\n'))
- ! *cp = NULL;
- for (cp = buffer; *cp; cp++)
- if (isspace (*cp))
- *cp = ' ';
- for (cp = buffer; isspace (*cp); cp++)
- continue;
- ! if (*cp == NULL)
- continue;
-
- q = aliases;
- if (cp = index (dp = cp, ' ')) {
- ! *cp = NULL;
- for (cp++; *cp; cp++) {
- while (isspace (*cp))
- cp++;
- ! if (*cp == NULL)
- break;
- if (cp = index (*q++ = cp, ' '))
- ! *cp = NULL;
- else
- break;
- if (q >= aliases + NALIASES)
- --- 111,137 ----
- h = &hosts;
- while (fgets (buffer, sizeof buffer, fp) != NULL) {
- if (cp = index (buffer, '#'))
- ! *cp = 0;
- if (cp = index (buffer, '\n'))
- ! *cp = 0;
- for (cp = buffer; *cp; cp++)
- if (isspace (*cp))
- *cp = ' ';
- for (cp = buffer; isspace (*cp); cp++)
- continue;
- ! if (*cp == 0)
- continue;
-
- q = aliases;
- if (cp = index (dp = cp, ' ')) {
- ! *cp = 0;
- for (cp++; *cp; cp++) {
- while (isspace (*cp))
- cp++;
- ! if (*cp == 0)
- break;
- if (cp = index (*q++ = cp, ' '))
- ! *cp = 0;
- else
- break;
- if (q >= aliases + NALIASES)
- ***************
- *** 136,142 ****
- }
- }
-
- ! *q = NULL;
-
- h -> h_next = (struct host *) calloc (1, sizeof *h);
- h = h -> h_next;
- --- 139,145 ----
- }
- }
-
- ! *q = 0;
-
- h -> h_next = (struct host *) calloc (1, sizeof *h);
- h = h -> h_next;
- ***************
- *** 145,151 ****
- (char **) calloc ((unsigned) (q - aliases + 1), sizeof *q);
- for (q = aliases; *q; q++)
- *r++ = getcpy (*q);
- ! *r = NULL;
- }
-
- (void) fclose (fp);
- --- 148,154 ----
- (char **) calloc ((unsigned) (q - aliases + 1), sizeof *q);
- for (q = aliases; *q; q++)
- *r++ = getcpy (*q);
- ! *r = 0;
- }
-
- (void) fclose (fp);
- *** ../mh-6.7.2/mts/sendmail/smail.c Tue Feb 6 12:58:45 1990
- --- mts/sendmail/smail.c Mon Nov 9 10:19:43 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* smail.c - MH interface to SendMail/SMTP */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: smail.c,v 1.21 1992/11/09 18:19:32 jromine Exp $";
- + #endif
-
- /* LINTLIBRARY */
-
- ***************
- *** 13,19 ****
- expect SendMail to be well-behaved and not hang on us. The only time
- I've ever seen Sendmail hang was with a bogus configuration file...
- */
- ! #endif BSD42
- #ifdef SENDMAILBUG
- /*
- * It appears that some versions of Sendmail will return Code 451
- --- 16,22 ----
- expect SendMail to be well-behaved and not hang on us. The only time
- I've ever seen Sendmail hang was with a bogus configuration file...
- */
- ! #endif /* BSD42 */
- #ifdef SENDMAILBUG
- /*
- * It appears that some versions of Sendmail will return Code 451
- ***************
- *** 25,44 ****
- */
- #ifndef SENDMAIL
- #undef SENDMAILBUG
- ! #endif not SENDMAIL
- ! #endif SENDMAILBUG
-
- #ifdef hpux
- /* HP-UX has this capability. It also handles (some) signals. */
- #define BSD42
- ! #endif hpux
-
- #if !defined(BSD42) && !defined(SOCKETS)
- #undef SMTP
- ! #endif not BSD42 and not SOCKETS
- #ifdef SMTP
- #undef SENDMAIL
- ! #endif SMTP
-
-
- #include "../h/strings.h"
- --- 28,47 ----
- */
- #ifndef SENDMAIL
- #undef SENDMAILBUG
- ! #endif /* not SENDMAIL */
- ! #endif /* SENDMAILBUG */
-
- #ifdef hpux
- /* HP-UX has this capability. It also handles (some) signals. */
- #define BSD42
- ! #endif /* hpux */
-
- #if !defined(BSD42) && !defined(SOCKETS)
- #undef SMTP
- ! #endif /* not BSD42 and not SOCKETS */
- #ifdef SMTP
- #undef SENDMAIL
- ! #endif /* SMTP */
-
-
- #include "../h/strings.h"
- ***************
- *** 48,53 ****
- --- 51,60 ----
- #include <ctype.h>
- #include <signal.h>
-
- + #ifndef TYPESIG
- + #define TYPESIG int
- + #endif
- +
- #define NOTOK (-1)
- #define OK 0
- #define DONE 1
- ***************
- *** 60,65 ****
- --- 67,73 ----
- #define min(a,b) ((a) < (b) ? (a) : (b))
-
-
- + /* these codes must all be different! */
- #define SM_OPEN 90 /* Changed from 30 in case of nameserver flakiness */
- #define SM_HELO 20
- #define SM_RSET 15
- ***************
- *** 66,85 ****
- #define SM_MAIL 40
- #define SM_RCPT 120
- #define SM_DATA 20
- ! #define SM_TEXT 120
- ! #define SM_DOT 120
- ! #define SM_QUIT 20
- #define SM_CLOS 10
-
- /* */
-
- ! static int alrmser ();
-
- static int sm_addrs = 0;
- static int sm_alarmed = 0;
- #ifndef SMTP
- static int sm_child = NOTOK;
- ! #endif not SMTP
- static int sm_debug = 0;
- static int sm_nl = TRUE;
- static int sm_verbose = 0;
- --- 74,93 ----
- #define SM_MAIL 40
- #define SM_RCPT 120
- #define SM_DATA 20
- ! #define SM_TEXT 150
- ! #define SM_DOT 180
- ! #define SM_QUIT 30
- #define SM_CLOS 10
-
- /* */
-
- ! static TYPESIG alrmser ();
-
- static int sm_addrs = 0;
- static int sm_alarmed = 0;
- #ifndef SMTP
- static int sm_child = NOTOK;
- ! #endif /* not SMTP */
- static int sm_debug = 0;
- static int sm_nl = TRUE;
- static int sm_verbose = 0;
- ***************
- *** 87,92 ****
- --- 95,105 ----
- static FILE * sm_rfp = NULL;
- static FILE * sm_wfp = NULL;
-
- + #ifdef MPOP
- + static int sm_ispool = 0;
- + static char sm_tmpfil[BUFSIZ];
- + #endif /* MPOP */
- +
- static char *sm_noreply = "No reply text given";
- static char *sm_moreply = "; ";
-
- ***************
- *** 99,104 ****
- --- 112,123 ----
- static int rclient(), sm_ierror(), smtalk(), sm_wrecord(), sm_wstream();
- static int sm_werror(), smhear(), sm_rrecord(), sm_rerror();
-
- + #ifdef MPOP
- + extern int errno, sys_nerr;
- + extern char *sys_errlist[];
- + extern char **brkstring (), **copyip (), *getcpy ();
- + #endif
- +
- /* */
-
- #ifndef SMTP
- ***************
- *** 120,130 ****
- --- 139,157 ----
- char *vec[15];
-
- if (watch)
- + #ifndef SUN40
- verbose = TRUE;
- + #else /* to show the transaction, -watch must imply -snoop */
- + debug = verbose = TRUE;
- + #endif
- sm_verbose = verbose;
- sm_debug = debug;
- if (sm_rfp != NULL && sm_wfp != NULL)
- return RP_OK;
- + #ifdef ZMAILER
- + if (client == NULL || *client == '\0')
- + client = "localhost";
- + #endif
-
- if (pipe (pdi) == NOTOK)
- return sm_ierror ("no pipes");
- ***************
- *** 157,162 ****
- --- 184,190 ----
- vecp = 0;
- vec[vecp++] = r1bindex (sendmail, '/');
- vec[vecp++] = "-bs";
- + #ifndef ZMAILER
- vec[vecp++] = watch ? "-odi" : "-odb";
- vec[vecp++] = "-oem";
- vec[vecp++] = "-om";
- ***************
- *** 163,169 ****
- #ifndef RAND
- if (verbose)
- vec[vecp++] = "-ov";
- ! #endif not RAND
- vec[vecp++] = NULL;
-
- (void) setgid (getegid ());
- --- 191,198 ----
- #ifndef RAND
- if (verbose)
- vec[vecp++] = "-ov";
- ! #endif /* not RAND */
- ! #endif /* not ZMAILER */
- vec[vecp++] = NULL;
-
- (void) setgid (getegid ());
- ***************
- *** 198,203 ****
- --- 227,237 ----
- (void) sm_end (NOTOK);
- return RP_RPLY;
- }
- + #ifndef ZMAILER
- + (void) smtalk(SM_HELO, "ONEX");
- + #endif /* not ZMAILER */
- + if (watch)
- + (void) smtalk(SM_HELO, "VERB on");
- if (client && *client)
- switch (smtalk (SM_HELO, "HELO %s", client)) {
- case 250:
- ***************
- *** 210,216 ****
- return RP_OK;
- }
- }
- ! #else SMTP
-
- /* */
-
- --- 244,250 ----
- return RP_OK;
- }
- }
- ! #else /* SMTP */
-
- /* */
-
- ***************
- *** 226,243 ****
- sd2;
-
- if (watch)
- verbose = TRUE;
- sm_verbose = verbose;
- sm_debug = debug;
- if (sm_rfp != NULL && sm_wfp != NULL)
- return RP_OK;
- ! #if !defined(SENDMTS) || defined(MMDFII)
- ! if (client == NULL || *client == NULL)
- client = LocalName ();
- #endif
-
- if ((sd1 = rclient (server, "tcp", "smtp")) == NOTOK)
- return RP_BHST;
- if ((sd2 = dup (sd1)) == NOTOK) {
- (void) close (sd1);
- return sm_ierror ("unable to dup");
- --- 260,308 ----
- sd2;
-
- if (watch)
- + #if defined(SUN40) && !defined(MMDFII)
- + debug = verbose = TRUE;
- + #else
- verbose = TRUE;
- + #endif
- sm_verbose = verbose;
- sm_debug = debug;
- if (sm_rfp != NULL && sm_wfp != NULL)
- return RP_OK;
- ! #ifdef ZMAILER
- ! if (client == NULL || *client == '\0')
- ! client = "localhost";
- ! #else
- ! #if !defined(SENDMTS) || defined(MMDFII) || defined(SVR4)
- ! if (client == NULL || *client == 0)
- client = LocalName ();
- #endif
- + #endif /* ZMAILER */
-
- + #ifdef MPOP
- + if (sm_ispool)
- + goto all_done;
- + #endif
- if ((sd1 = rclient (server, "tcp", "smtp")) == NOTOK)
- return RP_BHST;
- + #ifdef MPOP
- + if (sm_ispool) {
- + if (sm_rfp) {
- + (void) alarm (SM_CLOS);
- + (void) fclose (sm_rfp);
- + (void) alarm (0);
- + sm_rfp = NULL;
- + }
- + if ((sm_wfp = fdopen (sd1, "w")) == NULL) {
- + (void) unlink (sm_tmpfil);
- + (void) close (sd1);
- + return sm_ierror ("unable to fdopen");
- + }
- + all_done: ;
- + sm_reply.text[sm_reply.length = 0] = NULL;
- + return (sm_reply.code = RP_OK);
- + }
- + #endif /* MPOP */
- if ((sd2 = dup (sd1)) == NOTOK) {
- (void) close (sd1);
- return sm_ierror ("unable to dup");
- ***************
- *** 265,270 ****
- --- 330,342 ----
- (void) sm_end (NOTOK);
- return RP_RPLY;
- }
- + #if !(defined(ZMAILER) || defined(MMDFII))
- + (void) smtalk(SM_HELO, "ONEX");
- + #endif /* not ZMAILER */
- + #ifndef MMDFII
- + if (watch)
- + (void) smtalk(SM_HELO, "VERB on");
- + #endif
- if (client && *client)
- switch (smtalk (SM_HELO, "HELO %s", client)) {
- case 250:
- ***************
- *** 279,284 ****
- --- 351,360 ----
- }
-
-
- + #ifdef MPOP
- + #define MAXARGS 1000
- + #endif /* MPOP */
- +
- static int rclient (server, protocol, service)
- char *server,
- *protocol,
- ***************
- *** 286,299 ****
- {
- int sd;
- char response[BUFSIZ];
-
- if ((sd = client (server, protocol, service, FALSE, response)) != NOTOK)
- return sd;
-
- (void) sm_ierror ("%s", response);
- return NOTOK;
- }
- ! #endif SMTP
-
- /* */
-
- --- 362,407 ----
- {
- int sd;
- char response[BUFSIZ];
- + #ifdef MPOP
- + char *cp;
- + #endif /* MPOP */
-
- if ((sd = client (server, protocol, service, FALSE, response)) != NOTOK)
- return sd;
-
- + #ifdef MPOP
- + if (!server && servers && (cp = index (servers, '/'))) {
- + register char **ap;
- + char *arguments[MAXARGS];
- +
- + (void) copyip (brkstring (cp = getcpy (servers), " ", "\n"),
- + arguments);
- +
- + for (ap = arguments; *ap; ap++)
- + if (**ap == '/') {
- + register char *dp;
- +
- + if ((dp = rindex (*ap, '/')) && *++dp == NULL)
- + *--dp = NULL;
- + (void) sprintf (sm_tmpfil, "%s/smtpXXXXXX", *ap);
- + (void) mktemp (sm_tmpfil);
- +
- + if ((sd = creat (sm_tmpfil, 0600)) != NOTOK) {
- + sm_ispool = 1;
- + break;
- + }
- + }
- +
- + free (cp);
- + if (sd != NOTOK)
- + return sd;
- + }
- + #endif /* MPOP */
- +
- (void) sm_ierror ("%s", response);
- return NOTOK;
- }
- ! #endif /* SMTP */
-
- /* */
-
- ***************
- *** 301,306 ****
- --- 409,423 ----
- register int mode;
- register char *from;
- {
- + #ifdef MPOP
- + if (sm_ispool && !sm_wfp) {
- + (void) strlen (strcpy (sm_reply.text,
- + "unable to create new spool file"));
- + sm_reply.code = NOTOK;
- + return RP_BHST;
- + }
- + #endif /* MPOP */
- +
- switch (smtalk (SM_MAIL, "%s FROM:<%s>",
- mode == S_SEND ? "SEND" : mode == S_SOML ? "SOML"
- : mode == S_SAML ? "SAML" : "MAIL", from)) {
- ***************
- *** 322,334 ****
-
- #ifdef BERK
- /* ARGUSED */
- ! #endif BERK
-
- int sm_wadr (mbox, host, path)
- register char *mbox;
- #ifndef BERK
- register
- ! #endif not BERK
- char *host,
- *path;
- {
- --- 439,451 ----
-
- #ifdef BERK
- /* ARGUSED */
- ! #endif /* BERK */
-
- int sm_wadr (mbox, host, path)
- register char *mbox;
- #ifndef BERK
- register
- ! #endif /* not BERK */
- char *host,
- *path;
- {
- ***************
- *** 336,344 ****
- switch (smtalk (SM_RCPT, host && *host ? "RCPT TO:<%s%s@%s>"
- : "RCPT TO:<%s%s>",
- path ? path : "", mbox, host)) {
- ! #else BERK
- switch (smtalk (SM_RCPT, "RCPT TO:%s", mbox)) {
- ! #endif BERK
- case 250:
- case 251:
- sm_addrs++;
- --- 453,461 ----
- switch (smtalk (SM_RCPT, host && *host ? "RCPT TO:<%s%s@%s>"
- : "RCPT TO:<%s%s>",
- path ? path : "", mbox, host)) {
- ! #else /* BERK */
- switch (smtalk (SM_RCPT, "RCPT TO:%s", mbox)) {
- ! #endif /* BERK */
- case 250:
- case 251:
- sm_addrs++;
- ***************
- *** 348,354 ****
- #ifdef SENDMAILBUG
- sm_addrs++;
- return RP_OK;
- ! #endif SENDMAILBUG
- case 421:
- case 450:
- case 452:
- --- 465,471 ----
- #ifdef SENDMAILBUG
- sm_addrs++;
- return RP_OK;
- ! #endif /* SENDMAILBUG */
- case 421:
- case 450:
- case 452:
- ***************
- *** 381,387 ****
- #ifdef SENDMAILBUG
- sm_nl = TRUE;
- return RP_OK;
- ! #endif SENDMAILBUG
- case 421:
- return RP_NO;
-
- --- 498,504 ----
- #ifdef SENDMAILBUG
- sm_nl = TRUE;
- return RP_OK;
- ! #endif /* SENDMAILBUG */
- case 421:
- return RP_NO;
-
- ***************
- *** 426,432 ****
- case 451:
- #ifdef SENDMAILBUG
- return RP_OK;
- ! #endif SENDMAILBUG
- case 452:
- default:
- return RP_NO;
- --- 543,549 ----
- case 451:
- #ifdef SENDMAILBUG
- return RP_OK;
- ! #endif /* SENDMAILBUG */
- case 452:
- default:
- return RP_NO;
- ***************
- *** 454,460 ****
- default:
- break;
- }
- ! #endif not SMTP
- if (sm_rfp == NULL && sm_wfp == NULL)
- return RP_OK;
-
- --- 571,577 ----
- default:
- break;
- }
- ! #endif /* not SMTP */
- if (sm_rfp == NULL && sm_wfp == NULL)
- return RP_OK;
-
- ***************
- *** 474,482 ****
- (void) kill (sm_child, SIGKILL);
- discard (sm_rfp);
- discard (sm_wfp);
- ! #else SMTP
- (void) smtalk (SM_QUIT, "QUIT");
- ! #endif not SMTP
- if (type == NOTOK) {
- sm_reply.code = sm_note.code;
- (void) strncpy (sm_reply.text, sm_note.text,
- --- 591,599 ----
- (void) kill (sm_child, SIGKILL);
- discard (sm_rfp);
- discard (sm_wfp);
- ! #else /* SMTP */
- (void) smtalk (SM_QUIT, "QUIT");
- ! #endif /* not SMTP */
- if (type == NOTOK) {
- sm_reply.code = sm_note.code;
- (void) strncpy (sm_reply.text, sm_note.text,
- ***************
- *** 484,489 ****
- --- 601,619 ----
- }
- break;
- }
- + #ifdef MPOP
- + #ifdef SMTP
- + if (sm_ispool) {
- + sm_ispool = 0;
- +
- + if (sm_wfp) {
- + (void) unlink (sm_tmpfil);
- + (void) fclose (sm_wfp);
- + sm_wfp = NULL;
- + }
- + }
- + #endif
- + #endif /* MPOP */
- if (sm_rfp != NULL) {
- (void) alarm (SM_CLOS);
- (void) fclose (sm_rfp);
- ***************
- *** 499,507 ****
- status = pidwait (sm_child);
-
- sm_child = NOTOK;
- ! #else SMTP
- status = 0;
- ! #endif SMTP
- sm_rfp = sm_wfp = NULL;
-
- return (status ? RP_BHST : RP_OK);
- --- 629,637 ----
- status = pidwait (sm_child);
-
- sm_child = NOTOK;
- ! #else /* SMTP */
- status = 0;
- ! #endif /* SMTP */
- sm_rfp = sm_wfp = NULL;
-
- return (status ? RP_BHST : RP_OK);
- ***************
- *** 509,514 ****
- --- 639,994 ----
-
- /* */
-
- + #ifdef MPOP
- + #ifdef SMTP
- + #include <sys/types.h>
- + #include <sys/stat.h>
- +
- +
- + int sm_bulk (file)
- + char *file;
- + {
- + int cc,
- + i,
- + j,
- + k,
- + result;
- + long pos;
- + register char *dp;
- + char *bp,
- + *cp,
- + buffer[BUFSIZ],
- + sender[BUFSIZ];
- + FILE *fp,
- + *gp;
- +
- + gp = NULL;
- + k = strlen (file) - sizeof ".bulk";
- + if ((fp = fopen (file, "r")) == NULL) {
- + (void) sprintf (bp = sm_reply.text, "unable to read %s: ", file);
- + bp += strlen (bp);
- + if (errno > 0 && errno < sys_nerr)
- + (void) sprintf (bp, "%s", sys_errlist[errno]);
- + else
- + (void) sprintf (bp, "Error %d", errno);
- + sm_reply.length = strlen (sm_reply.text);
- + sm_reply.code = NOTOK;
- + return RP_BHST;
- + }
- + if (sm_debug) {
- + printf ("reading file %s\n", file);
- + (void) fflush (stdout);
- + }
- +
- + i = j = 0;
- + while (fgets (buffer, sizeof buffer, fp)) {
- + if (j++ == 0)
- + (void) strcpy (sender, buffer + sizeof "MAIL FROM:" - 1);
- + if (strcmp (buffer, "DATA\r\n") == 0) {
- + i = 1;
- + break;
- + }
- + }
- + if (i == 0) {
- + if (sm_debug) {
- + printf ("no DATA...\n");
- + (void) fflush (stdout);
- + }
- + losing0: ;
- + (void) sprintf (buffer, "%s.bad", file);
- + (void) rename (file, buffer);
- + if (gp) {
- + (void) sprintf (buffer, "%*.*sA.bulk", k, k, file);
- + (void) unlink (buffer);
- + (void) fclose (gp);
- + }
- + (void) fclose (fp);
- + return RP_OK;
- + }
- + if (j < 3) {
- + if (sm_debug) {
- + printf ("no %srecipients...\n", j < 1 ? "sender or " : "");
- + (void) fflush (stdout);
- + }
- + goto losing0;
- + }
- +
- + if ((cp = malloc ((unsigned) (cc = (pos = ftell (fp)) + 1))) == NULL) {
- + sm_reply.length = strlen (strcpy (sm_reply.text, "out of memory"));
- + losing1: ;
- + sm_reply.code = NOTOK;
- + (void) fclose (fp);
- + return RP_BHST;
- + }
- + (void) fseek (fp, 0L, 0);
- + for (dp = cp, i = 0; i++ < j; dp += strlen (dp))
- + if (fgets (dp, cc - (dp - cp), fp) == NULL) {
- + sm_reply.length = strlen (strcpy (sm_reply.text, "premature eof"));
- + losing2: ;
- + free (cp);
- + goto losing1;
- + }
- + *dp = NULL;
- +
- + for (dp = cp, i = cc - 1; i > 0; dp += cc, i -= cc)
- + if ((cc = write (fileno (sm_wfp), dp, i)) == NOTOK) {
- + losing3: ;
- + (void) strcpy (bp = sm_reply.text, "error writing to server: ");
- + bp += strlen (bp);
- + if (errno > 0 && errno < sys_nerr)
- + (void) sprintf (bp, "%s", sys_errlist[errno]);
- + else
- + (void) sprintf (bp, "Error %d", errno);
- + sm_reply.length = strlen (sm_reply.text);
- + goto losing2;
- + }
- + else
- + if (sm_debug) {
- + printf ("wrote %d octets to server\n", cc);
- + (void) fflush (stdout);
- + }
- +
- + for (dp = cp, i = 0; i++ < j; dp = index (dp, '\n'), dp++) {
- + if (sm_debug) {
- + if (bp = index (dp, '\r'))
- + *bp = NULL;
- + printf ("=> %s\n", dp);
- + (void) fflush (stdout);
- + if (bp)
- + *bp = '\r';
- + }
- +
- + switch (smhear () + (i == 1 ? 1000 : i != j ? 2000 : 3000)) {
- + case 1000 + 250:
- + sm_addrs = 0;
- + result = RP_OK;
- + break;
- +
- + case 1000 + 500:
- + case 1000 + 501:
- + case 1000 + 552:
- + case 2000 + 500:
- + case 2000 + 501:
- + result = RP_PARM;
- + (void) smtalk (SM_RSET, "RSET");
- + free (cp);
- + goto losing0;
- +
- + case 2000 + 250:
- + case 2000 + 251:
- + sm_addrs++;
- + result = RP_OK;
- + break;
- +
- + case 2000 + 451:
- + #ifdef SENDMAILBUG
- + sm_addrs++;
- + result = RP_OK;
- + break;
- + #endif
- + case 2000 + 421:
- + case 2000 + 450:
- + case 2000 + 452:
- + result = RP_NO;
- + goto bad_addr;
- +
- + case 2000 + 550:
- + case 2000 + 551:
- + case 2000 + 552:
- + case 2000 + 553:
- + result = RP_USER;
- + bad_addr: ;
- + if (k <= 0 || strcmp (sender, "<>\r\n") == 0)
- + break;
- + if (gp == NULL) {
- + int l;
- + (void) sprintf (buffer, "%*.*sA.bulk", k, k, file);
- + if ((gp = fopen (buffer, "w+")) == NULL)
- + goto bad_data;
- + fprintf (gp, "MAIL FROM:<>\r\nRCPT TO:%sDATA\r\n", sender);
- + l = strlen (sender);
- + fprintf (gp,
- + "To: %*.*s\r\nSubject: Invalid addresses (%s)\r\n",
- + l - 4, l - 4, sender + 1, file);
- + fprintf (gp, "Date: %s\r\nFrom: Postmaster@%s\r\n\r\n",
- + dtimenow (), LocalName ());
- + }
- + if (bp = index (dp, '\r'))
- + *bp = NULL;
- + fprintf (gp, "=> %s\r\n", dp);
- + if (bp)
- + *bp = '\r';
- + fprintf (gp, "<= %s\r\n", rp_string (result));
- + (void) fflush (gp);
- + break;
- +
- + case 3000 + 354:
- + #ifdef SENDMAILBUG
- + ok_data: ;
- + #endif
- + result = RP_OK;
- + break;
- +
- + case 3000 + 451:
- + #ifdef SENDMAILBUG
- + goto ok_data;
- + #endif
- + case 3000 + 421:
- + result = RP_NO;
- + bad_data: ;
- + (void) smtalk (SM_RSET, "RSET");
- + free (cp);
- + if (gp) {
- + (void) sprintf (buffer, "%*.*sA.bulk", k, k, file);
- + (void) unlink (buffer);
- + (void) fclose (gp);
- + }
- + (void) fclose (fp);
- + return result;
- +
- + case 3000 + 500:
- + case 3000 + 501:
- + case 3000 + 503:
- + case 3000 + 554:
- + (void) smtalk (SM_RSET, "RSET");
- + free (cp);
- + goto no_dice;
- +
- + default:
- + result = RP_RPLY;
- + goto bad_data;
- + }
- + }
- + free (cp);
- +
- + {
- + struct stat st;
- +
- + #ifdef SYS5
- + cc = BUFSIZ;
- + #else
- + if (fstat (fileno (sm_wfp), &st) == NOTOK
- + || (cc = st.st_blksize) < BUFSIZ)
- + cc = BUFSIZ;
- + #endif
- + if ((cp = malloc ((unsigned) cc)) == NULL) {
- + (void) smtalk (SM_RSET, "RSET");
- + sm_reply.length = strlen (strcpy (sm_reply.text, "out of memory"));
- + goto losing1;
- + }
- + }
- + (void) fseek (fp, pos, 0);
- + for (;;) {
- + int eof = 0;
- +
- + for (dp = cp, i = cc; i > 0; dp += j, i -= j)
- + if ((j = fread (cp, sizeof *cp, i, fp)) == OK) {
- + if (ferror (fp)) {
- + (void) sprintf (bp = sm_reply.text,
- + "error reading %s: ", file);
- + bp += strlen (bp);
- + if (errno > 0 && errno < sys_nerr)
- + (void) sprintf (bp, "%s", sys_errlist[errno]);
- + else
- + (void) sprintf (bp, "Error %d", errno);
- + sm_reply.length = strlen (sm_reply.text);
- + goto losing2;
- + }
- + cc = dp - cp;
- + eof = 1;
- + break;
- + }
- +
- + for (dp = cp, i = cc; i > 0; dp += j, i -= j)
- + if ((j = write (fileno (sm_wfp), dp, i)) == NOTOK)
- + goto losing3;
- + else
- + if (sm_debug) {
- + printf ("wrote %d octets to server\n", j);
- + (void) fflush (stdout);
- + }
- +
- + if (eof)
- + break;
- + }
- + free (cp);
- +
- + switch (smhear ()) {
- + case 250:
- + case 251:
- + #ifdef SENDMAILBUG
- + ok_dot: ;
- + #endif
- + result = RP_OK;
- + (void) unlink (file);
- + break;
- +
- + case 451:
- + #ifdef SENDMAILBUG
- + goto ok_dot;
- + #endif
- + case 452:
- + default:
- + result = RP_NO;
- + if (gp) {
- + (void) sprintf (buffer, "%*.*sA.bulk", k, k, file);
- + (void) unlink (buffer);
- + (void) fclose (gp);
- + gp = NULL;
- + }
- + break;
- +
- + case 552:
- + case 554:
- + no_dice: ;
- + result = RP_NDEL;
- + if (k <= 0 || strcmp (sender, "<>\r\n") == 0) {
- + (void) unlink (file);
- + break;
- + }
- + if (gp) {
- + (void) fflush (gp);
- + (void) ftruncate (fileno (gp), 0L);
- + (void) fseek (gp, 0L, 0);
- + }
- + else {
- + (void) sprintf (buffer, "%*.*sA.bulk", k, k, file);
- + if ((gp = fopen (buffer, "w")) == NULL)
- + break;
- + }
- + fprintf (gp, "MAIL FROM:<>\r\nRCPT TO:%sDATA\r\n", sender);
- + i = strlen (sender);
- + fprintf (gp, "To: %*.*s\r\nSubject: Failed mail (%s)\r\n",
- + i - 4, i - 4, sender + 1, file);
- + fprintf (gp, "Date: %s\r\nFrom: Postmaster@%s\r\n\r\n",
- + dtimenow (), LocalName ());
- + break;
- + }
- +
- + if (gp) {
- + (void) fputs ("\r\n------- Begin Returned message\r\n\r\n", gp);
- + (void) fseek (fp, pos, 0);
- + while (fgets (buffer, sizeof buffer, fp)) {
- + if (buffer[0] == '-')
- + (void) fputs ("- ", gp);
- + if (strcmp (buffer, ".\r\n"))
- + (void) fputs (buffer, gp);
- + }
- + (void) fputs ("\r\n------- End Returned Message\r\n\r\n.\r\n", gp);
- + (void) fflush (gp);
- + if (!ferror (gp))
- + (void) unlink (file);
- + (void) fclose (gp);
- + }
- + (void) fclose (fp);
- +
- + return result;
- + }
- + #endif
- + #endif /* MPOP */
- +
- + /* */
- +
- /* VARARGS */
-
- static int sm_ierror (fmt, a, b, c, d)
- ***************
- *** 542,547 ****
- --- 1022,1097 ----
- (void) fflush (stdout);
- }
-
- + #ifdef MPOP
- + if (sm_ispool) {
- + char file[BUFSIZ];
- +
- + if (strcmp (buffer, ".") == 0)
- + time = SM_DOT;
- + fprintf (sm_wfp, "%s\r\n", buffer);
- + switch (time) {
- + case SM_DOT:
- + (void) fflush (sm_wfp);
- + if (ferror (sm_wfp))
- + return sm_werror ();
- + (void) sprintf (file, "%s%c.bulk", sm_tmpfil,
- + (char) (sm_ispool + 'a' - 1));
- + if (rename (sm_tmpfil, file) == NOTOK) {
- + char *bp;
- + (void) sprintf (bp = sm_reply.text,
- + "error renaming %s to %s: ",
- + sm_tmpfil, file);
- + bp += strlen (bp);
- + if (errno > 0 && errno < sys_nerr)
- + (void) sprintf (bp, "%s", sys_errlist[errno]);
- + else
- + (void) sprintf (bp, "Error %d", errno);
- + sm_reply.length = strlen (sm_reply.text);
- + sm_reply.code = NOTOK;
- + return RP_BHST;
- + }
- + (void) fclose (sm_wfp);
- + if (sm_wfp = fopen (sm_tmpfil, "w"))
- + (void) chmod (sm_tmpfil, 0600);
- + sm_ispool++;
- + /* and fall... */
- +
- + case SM_MAIL:
- + case SM_RCPT:
- + result = 250;
- + break;
- +
- + case SM_RSET:
- + (void) fflush (sm_wfp);
- + (void) ftruncate (fileno (sm_wfp), 0L);
- + (void) fseek (sm_wfp, 0L, 0);
- + result = 250;
- + break;
- +
- + case SM_DATA:
- + result = 354;
- + break;
- +
- + case SM_QUIT:
- + (void) unlink (sm_tmpfil);
- + sm_ispool = 0;
- + result = 221;
- + break;
- +
- + default:
- + result = 500;
- + break;
- + }
- + if (sm_debug) {
- + printf ("<= %d\n", result);
- + (void) fflush (stdout);
- + }
- +
- + sm_reply.text[sm_reply.length = 0] = NULL;
- + return (sm_reply.code = result);
- + }
- + #endif /* MPOP */
- +
- sm_alarmed = 0;
- (void) alarm ((unsigned) time);
- if ((result = sm_wrecord (buffer, strlen (buffer))) != NOTOK)
- ***************
- *** 561,567 ****
- return sm_werror ();
-
- (void) fwrite (buffer, sizeof *buffer, len, sm_wfp);
- ! fputs ("\r\n", sm_wfp);
- (void) fflush (sm_wfp);
-
- return (ferror (sm_wfp) ? sm_werror () : OK);
- --- 1111,1117 ----
- return sm_werror ();
-
- (void) fwrite (buffer, sizeof *buffer, len, sm_wfp);
- ! (void) fputs ("\r\n", sm_wfp);
- (void) fflush (sm_wfp);
-
- return (ferror (sm_wfp) ? sm_werror () : OK);
- ***************
- *** 574,580 ****
- register int len;
- {
- register char *bp;
- ! static char lc = NULL;
-
- if (sm_wfp == NULL)
- return sm_werror ();
- --- 1124,1130 ----
- register int len;
- {
- register char *bp;
- ! static char lc = 0;
-
- if (sm_wfp == NULL)
- return sm_werror ();
- ***************
- *** 581,588 ****
-
- if (buffer == NULL && len == 0) {
- if (lc != '\n')
- ! fputs ("\r\n", sm_wfp);
- ! lc = NULL;
- return (ferror (sm_wfp) ? sm_werror () : OK);
- }
-
- --- 1131,1138 ----
-
- if (buffer == NULL && len == 0) {
- if (lc != '\n')
- ! (void) fputs ("\r\n", sm_wfp);
- ! lc = 0;
- return (ferror (sm_wfp) ? sm_werror () : OK);
- }
-
- ***************
- *** 611,627 ****
-
- /* */
-
- static int sm_werror () {
- sm_reply.length =
- #ifdef SMTP
- strlen (strcpy (sm_reply.text, sm_wfp == NULL ? "no socket opened"
- : sm_alarmed ? "write to socket timed out"
- : "error writing to socket"));
- ! #else not SMTP
- strlen (strcpy (sm_reply.text, sm_wfp == NULL ? "no pipe opened"
- : sm_alarmed ? "write to pipe timed out"
- : "error writing to pipe"));
- ! #endif not SMTP
-
- return (sm_reply.code = NOTOK);
- }
- --- 1161,1191 ----
-
- /* */
-
- + #ifdef _AIX
- + /*
- + * AIX by default will inline the strlen and strcpy commands by redefining
- + * them as __strlen and __strcpy respectively. This causes compile problems
- + * with the #ifdef MPOP in the middle. Should the #ifdef MPOP be removed,
- + * remove these #undefs.
- + */
- + #undef strlen
- + #undef strcpy
- + #endif /* _AIX */
- +
- static int sm_werror () {
- sm_reply.length =
- #ifdef SMTP
- strlen (strcpy (sm_reply.text, sm_wfp == NULL ? "no socket opened"
- : sm_alarmed ? "write to socket timed out"
- + #ifdef MPOP
- + : sm_ispool ? "error writing to spool file"
- + #endif
- : "error writing to socket"));
- ! #else /* !SMTP */
- strlen (strcpy (sm_reply.text, sm_wfp == NULL ? "no pipe opened"
- : sm_alarmed ? "write to pipe timed out"
- : "error writing to pipe"));
- ! #endif /* !SMTP */
-
- return (sm_reply.code = NOTOK);
- }
- ***************
- *** 641,647 ****
-
- again: ;
-
- ! sm_reply.text[sm_reply.length = 0] = NULL;
-
- rp = sm_reply.text, rc = sizeof sm_reply.text - 1;
- for (more = FALSE; sm_rrecord (bp = buffer, &bc) != NOTOK;) {
- --- 1205,1211 ----
-
- again: ;
-
- ! sm_reply.text[sm_reply.length = 0] = 0;
-
- rp = sm_reply.text, rc = sizeof sm_reply.text - 1;
- for (more = FALSE; sm_rrecord (bp = buffer, &bc) != NOTOK;) {
- ***************
- *** 712,718 ****
- if (sm_rfp == NULL)
- return sm_rerror ();
-
- ! buffer[*len = 0] = NULL;
-
- (void) fgets (buffer, BUFSIZ, sm_rfp);
- *len = strlen (buffer);
- --- 1276,1282 ----
- if (sm_rfp == NULL)
- return sm_rerror ();
-
- ! buffer[*len = 0] = 0;
-
- (void) fgets (buffer, BUFSIZ, sm_rfp);
- *len = strlen (buffer);
- ***************
- *** 724,730 ****
- else
- if (buffer[*len - 2] == '\r')
- *len -= 1;
- ! buffer[*len - 1] = NULL;
-
- return OK;
- }
- --- 1288,1294 ----
- else
- if (buffer[*len - 2] == '\r')
- *len -= 1;
- ! buffer[*len - 1] = 0;
-
- return OK;
- }
- ***************
- *** 738,749 ****
- : sm_alarmed ? "read from socket timed out"
- : feof (sm_rfp) ? "premature end-of-file on socket"
- : "error reading from socket"));
- ! #else not SMTP
- strlen (strcpy (sm_reply.text, sm_rfp == NULL ? "no pipe opened"
- : sm_alarmed ? "read from pipe timed out"
- : feof (sm_rfp) ? "premature end-of-file on pipe"
- : "error reading from pipe"));
- ! #endif not SMTP
-
- return (sm_reply.code = NOTOK);
- }
- --- 1302,1313 ----
- : sm_alarmed ? "read from socket timed out"
- : feof (sm_rfp) ? "premature end-of-file on socket"
- : "error reading from socket"));
- ! #else /* not SMTP */
- strlen (strcpy (sm_reply.text, sm_rfp == NULL ? "no pipe opened"
- : sm_alarmed ? "read from pipe timed out"
- : feof (sm_rfp) ? "premature end-of-file on pipe"
- : "error reading from pipe"));
- ! #endif /* not SMTP */
-
- return (sm_reply.code = NOTOK);
- }
- ***************
- *** 752,763 ****
-
- /* ARGSUSED */
-
- ! static int alrmser (i)
- int i;
- {
- #ifndef BSD42
- signal (SIGALRM, alrmser);
- ! #endif BSD42
- sm_alarmed++;
-
- if (sm_debug) {
- --- 1316,1327 ----
-
- /* ARGSUSED */
-
- ! static TYPESIG alrmser (i)
- int i;
- {
- #ifndef BSD42
- signal (SIGALRM, alrmser);
- ! #endif /* BSD42 */
- sm_alarmed++;
-
- if (sm_debug) {
- ***************
- *** 817,819 ****
- --- 1381,1447 ----
- (void) sprintf (buffer, "[%s] %3d %s", text, sm_reply.code, sm_reply.text);
- return buffer;
- }
- +
- + /* */
- +
- + #ifdef MPOP
- + #ifdef SMTP
- + static char *broken[MAXARGS + 1];
- +
- +
- + static char **brkstring (strg, brksep, brkterm)
- + register char *strg;
- + register char *brksep,
- + *brkterm;
- + {
- + register int bi;
- + register char c,
- + *sp;
- +
- + sp = strg;
- +
- + for (bi = 0; bi < MAXARGS; bi++) {
- + while (brkany (c = *sp, brksep))
- + *sp++ = 0;
- + if (!c || brkany (c, brkterm)) {
- + *sp = 0;
- + broken[bi] = 0;
- + return broken;
- + }
- +
- + broken[bi] = sp;
- + while ((c = *++sp) && !brkany (c, brksep) && !brkany (c, brkterm))
- + continue;
- + }
- + broken[MAXARGS] = 0;
- +
- + return broken;
- + }
- +
- +
- + static brkany (chr, strg)
- + register char chr,
- + *strg;
- + {
- + register char *sp;
- +
- + if (strg)
- + for (sp = strg; *sp; sp++)
- + if (chr == *sp)
- + return 1;
- + return 0;
- + }
- +
- +
- + static char **copyip (p, q)
- + register char **p,
- + **q;
- + {
- + while (*p)
- + *q++ = *p++;
- + *q = 0;
- +
- + return q;
- + }
- + #endif
- + #endif /* MPOP */
- *** ../mh-6.7.2/papers/bboards/Makefile Tue Mar 6 14:49:43 1990
- --- papers/bboards/Makefile Thu Feb 13 10:23:48 1992
- ***************
- *** 10,12 ****
-
- ! .tex.dvi:; sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex82 \
- \\nonstopmode\\input $<\\bye; \
- --- 10,12 ----
-
- ! .tex.dvi:; sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex \
- \\nonstopmode\\input $<\\bye; \
- *** ../mh-6.7.2/papers/beginners/beginners.tex Tue May 17 15:38:24 1988
- --- papers/beginners/beginners.tex Thu Feb 13 10:34:58 1992
- ***************
- *** 4,5 ****
- --- 4,7 ----
-
- + %$Id: beginners.tex,v 1.2 1992/02/13 18:34:49 jromine Exp $
- +
- \def\oneline#1{\par\bigskip\leftline{\tt\hskip.75in#1}}
- ***************
- *** 22,23 ****
- --- 24,28 ----
- for Xeroxing in suite CS408.
- + \footnote{This document is specific to the environment
- + at the ICS department of U.~C.~Irvine. For a more general document,
- + see {\sl The Rand MH Message Handling System: Tutorial\/}.}
-
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- papers/changes/MHCHANGES Thu Oct 29 14:54:48 1987
- ***************
- *** 0 ****
- --- 1,1539 ----
- + MHCHANGES from MH 6.1 to MH 6.5
- +
- +
- + Tue Nov 12 11:24:46 1985 /mtr <mrose@nrtc-gremlin>
- +
- + MH 6.1 is official.
- +
- +
- + Fri Nov 15 19:14:44 1985 /mtr <mrose@nrtc-gremlin>
- +
- + uip/{rcvtty,slocal}.c: touch-ups
- +
- +
- + Sun Nov 17 16:28:23 1985 /mtr <mrose@nrtc-gremlin>
- +
- + conf/doc/{ap,mhl,repl,scan}.rf: note that #ifdef BERK kills
- + address parsing
- + conf/makefiles/{doc,uip,support/*,zotnet/*}: make tar command visible
- + sbr/m_convert.c: oops, new message numbering resulted in bad
- + diagnostic
- + papers/*/Makefile: fix LaTeX rule for v2.08
- +
- +
- + Tue Nov 19 23:06:16 1985 /mtr <mrose@nrtc-gremlin>
- +
- + uip/send.c: de-referencing NULL due to bad precedence, tsk
- +
- +
- + Wed Nov 20 10:58:40 1985 /mtr <mrose@nrtc-gremlin>
- +
- + MH 6.1 covert update for sbr/m_convert.c, uip/send.c
- +
- +
- + Sun Nov 24 18:58:41 1985 /mtr <mrose@nrtc-gremlin>
- +
- + uip/slocal.c: some tuning, also fix a bug in usr_pipe()
- + uip/dropsbr.c: have mbx_copy support noisy
- + uip/{packf,post,rcvpack,sbboards,slocal}.c: use this change
- +
- +
- + Tue Nov 26 00:22:17 1985 /mtr <mrose@nrtc-gremlin>
- +
- + uip/refile.c: oops, forgot copy-back on optimzied m_remsg
- +
- +
- + Sat Nov 30 22:36:49 1985 /mtr <mrose@nrtc-gremlin>
- +
- + zotnet/tws/dtime.c: add #ifdef INETONLY
- + uip/post.c: for #ifdef BERK don't say {Local,UUCP,Network}
- + Recipients
- + conf/doc/sortm.rf: note problem with errors
- + uip/bbc.c: for getbbvis() insist on readability
- + support/bboards/bbexp.c: oops, calling pick wrong
- + conf/doc/pick.rf: document -datefield anomaly
- + conf/makefiles/support/bboards: oops, left context owned by root
- + h/mh.h: ruserpass -> _ruserpass for SUN. why?
- +
- +
- + Sun Dec 1 07:58:50 1985 /mtr <mrose@nrtc-gremlin>
- +
- + uip/vmh.c: remove double-scroll
- + uip/annosbr.c: oops, closing fd: without unlocking!
- + sbr/makedir.c: plug an obscure security hole in inc
- + uip/mhlsbr.c: read_termcap being called prematurely
- + zotnet/tws/dtime.c: load tw_sday appropriately
- + zotnet/tws/*.c: try using numeric timezone for official renditions,
- + under #ifdef MTR for now
- +
- +
- + Sun Dec 1 16:11:03 1985 /mtr <mrose@nrtc-gremlin>
- +
- + uip/inc.c: more idiotic de-referncing of NULL, found on SUNs
- + uip/replsbr.c: ditto
- + uip/show.c: recognize more of mhl's switches
- +
- +
- + Wed Dec 4 23:38:06 1985 /mtr <mrose@nrtc-gremlin>
- +
- + zotnet/mts/mts.h: oops for MMDFONLY
- + conf/{mh-gen.8,makefiles/zotnet/mts}: talk about -Dlocname
- +
- +
- + Thu Dec 5 19:55:11 1985 /mtr <mrose@nrtc-gremlin>
- +
- + uip/scansbr.c: fix machine dependency pointed out by Chuck Collins
- + dist/READ-ME: new file talking about make bug
- + COVER-LETTER, conf/{mh-gen.8,doc/MH.rf}: change UCI -> UCI.EDU
- +
- +
- + Fri Dec 6 11:08:20 1985 /mtr <mrose@nrtc-gremlin>
- +
- + support/bboards/mmdfII/gen: wrong filename
- +
- +
- + Sun Dec 8 18:39:01 1985 /mtr <mrose@nrtc-gremlin>
- +
- + uip/send.c: always remove dist file
- + uip/vmh.c: work on erase-word handling, a bit
- + uip/folder.c: -fast -vs- -pack fixup
- + uip/mhlsbr.c: %text defined for date fields
- +
- +
- + Tue Dec 10 18:39:37 1985 /mtr <mrose@nrtc-gremlin>
- +
- + zotnet/mts/client.c: moved from mts/sendmail/client.c
- + conf/makefiles/{mts/sendmail,zotnet/mts}: changed
- + mts/support/llib-lsendmail, zotnet/mts/llib-lmts: changed
- + mts/sendmail/client.c: 4.2BSD specific only!
- + conf/config/mts.c, zotnet/mts/mts.h: update
- + conf/mhconfig.c: update
- + conf/Makefile: simplify
- +
- +
- + Tue Dec 10 21:11:45 1985 /mtr <mrose@nrtc-gremlin>
- +
- + conf/mh-gen.8: clear up some sys5 stuff
- + zotnet/mf/umhook.c: sys5-ize
- + uip/addrsbr.c: alternate-mailboxes: defaulted wrong under #ifdef
- + BERK, it's now "<userid>*"
- + conf/doc/mh-profile.rf: fix documentation to reflect reality
- +
- +
- + Tue Dec 10 22:38:23 1985 /mtr <mrose@nrtc-gremlin>
- +
- + uip/addrsbr.c: normalize a bit (finally)
- + uip/addrsbr.c: new routine adrsprintf() to remove #ifdef BANG
- + dependencies
- + uip/{post,rcvdist,replsbr,sbboards}.c: use adrsprintf()
- + uip/post.c: remove #ifdef MF dependency for stand-alone MH,
- + remove #ifdef DUMB dependency by making addrsbr.c smarter
- + about being dumber
- + mts/mmdf/hosts.c: remove #ifdef DUMB dependency (right now,
- + addrsbr:getm() is the only one that calls it and it doesn't
- + call it under #ifdef DUMB...
- +
- +
- + Tue Dec 10 23:28:20 1985 /mtr <mrose@nrtc-gremlin>
- +
- + uip/sbboards.c: oops, typo found by lint
- +
- +
- + Wed Dec 11 19:08:20 1985 /mtr <mrose@nrtc-gremlin>
- +
- + miscellany/libndir: -lndir for non-BSD sites, graciously supplied
- + by Kirk McKusick
- +
- +
- + Tue Dec 17 08:36:59 1985 /mtr <mrose@nrtc-gremlin>
- +
- + uip/send.c: different alert announcement based on -forward
- +
- +
- + Tue Dec 17 08:53:52 1985 /mtr <mrose@nrtc-gremlin>
- +
- + conf/makefiles/sbr, sbr/cndfree.c: clean-up a bit
- +
- +
- + Tue Dec 17 18:26:34 1985 /mtr <mrose@nrtc-gremlin>
- +
- + sbr/m_getfld.c, uip/{format,mhl,pick}sbr.c: clean-up indirection
- + code for less tolerant compilers
- + uip/bbc.c: add -[no]rcfile switch
- + uip/msh.c: clean up a diagnostic
- +
- +
- + Tue Dec 17 21:42:44 1985 /mtr <mrose@nrtc-gremlin>
- +
- + conf/makefiles/sbr, h/mh.h, sbr/llib-lmh: cndfree() removed
- + sbr/{add,m_{delete,replace}}.c, uip/{mhl,vmh}sbr.c: replace cndfree
- + sbr/m_foil.c, uip/install-mh.c: compensate
- +
- +
- + Wed Dec 18 13:37:09 1985 /mtr <mrose@nrtc-gremlin>
- +
- + uip/bbc.c: make second, optimized pass to catch private bboards
- + that the user knows about
- + uip/popsbr.c: ditto
- + uip/popser.c: slight tune-up
- +
- +
- + Wed Dec 18 20:27:38 1985 /mtr <mrose@nrtc-gremlin>
- +
- + uip/slocal.c: minor touch up
- + uip/umhook.c: moved from zotnet/mf
- +
- +
- + Wed Dec 18 22:51:58 1985 /mtr <mrose@nrtc-gremlin>
- +
- + uip/bbc.c: optimize on calling mshproc, check size of maildrop
- + first; if empty, don't invoke it!
- +
- +
- + Thu Dec 19 08:16:54 1985 /mtr <mrose@nrtc-gremlin>
- +
- + uip/refile.c: better diagnostic from Fred Blonder
- +
- +
- + Thu Dec 19 22:34:23 1985 /mtr <mrose@nrtc-gremlin>
- +
- + zotnet/mts/client.c: #ifdef BIND code when no gethostent()
- + conf/{mh-gen.8,doc/mh-tailor.rf}: document it
- +
- +
- + Thu Dec 19 23:58:44 1985 /mtr <mrose@nrtc-gremlin>
- +
- + Release MH 6.2 to selected sites, including Berkeley for 4.3BSD testing
- +
- +
- + Sun Dec 29 19:58:43 1985 /mtr <mrose@nrtc>
- +
- + zotnet/mts/client.c: fix #ifdef BIND stuff a bit
- + h/mshsbr.h, uip/{mhlsbr,msh,mshcmds}.c: try to fix lost peer
- + problems...
- + conf/doc/vmh.rf: update
- + zotnet/drop/lock.c: not returning right errno
- + uip/dropsbr.c: ditto, plus not trying enough
- + conf/makefiles/doc: "make tar" forgetting tmac.h
- + uip/addrsbr.c: strcpy de-referencing NULL
- + uip/refile.c: got rid of a spurious \n (!!)
- + conf/examples/{udel,nrtc-mtr}: new files
- + h/mh.h, sbr/m_{convert,gmsg}.c, uip/{msh,rcvstore,refile}.c: fix
- + LOWSEL logic
- + uip/vmh.c: fix slight bug in sideground handling (misspelled
- + #ifdef, oops!)
- + conf/{mh-gen.8,config/mts.c},mts/*/hosts.c: remove the NETWORK option
- +
- +
- + Mon Dec 30 20:03:25 1985 /mtr <mrose@nrtc>
- +
- + conf/Makefile: options mangled(!?!)
- + uip/msh.c: if update of mailbox fails, it gets zero'd(!!)
- + (oops, not checking error condition)
- + support/pop/popser.c: if update of mailbox fails, clean-up
- + correctly (no zero problem here!)
- + uip/inc.c: on truncate of maildrop, remove mailbox map (XXX)
- + conf/makefiles/uip, uip/{send,whatnowsbr}.c: move send into
- + the WhatNow shell
- + uip/sendsbr.c: new file
- + conf/doc/whatnow.rf: update
- +
- +
- + Tue Dec 31 10:13:44 1985 /mtr <mrose@nrtc>
- +
- + conf/doc/vmh.rf: back-down last update
- + conf/mh-gen.8: forgot an \&
- + conf/examples/nrtc-{gw,mtr}, h/rcvmail.h: tsk, NRTC running an old
- + MMDF-II
- +
- +
- + Tue Dec 31 13:53:14 1985 /mtr <mrose@nrtc>
- +
- + conf/doc/whatnow.rf, uip/whatnowsbr.c: remove "headers" option
- + conf/doc/ADMIN.rf: clear-up post -debug documentation
- + conf/doc/{mh-chart,send,post}.rf, uip/{post,send,whatnowsbr}.c: remove
- + -[no]remove switches
- + uip/{repl,post}.c: some touch-ups
- +
- +
- + Tue Dec 31 19:16:23 1985 /mtr <mrose@nrtc>
- +
- + zotnet/tws/{dtime,dtimep}.c: dst fix-ups
- + conf/doc/send.rf: append, not prepend
- + uip/rmail.c: slight touch-up
- + uip/ap.c: oops, not printing all info
- + zotnet/mf/mf.c: botching trailing comment handling!
- + uip/scansbr.c: have cpy() omit trailing >>blank<<
- + sbr/m_gmsg.c: not zero'ing msgstats[] under non-MTR code
- +
- +
- + Tue Dec 31 22:23:43 1985 /mtr <mrose@nrtc>
- +
- + conf/doc/mhook.rf: minor typos
- + miscellany/rcvtrip/*: update
- +
- +
- + Tue Dec 31 23:21:21 1985 /mtr <mrose@nrtc>
- +
- + uip/mhlsbr.c: a bit more pipe trickyness (this gets old real fast)
- + conf/doc/ADMIN.rf: talk about popd and /etc/rc.local
- + papers/{myths,mznet}/Makefile: update
- + uip/bbc.c: augment XTND2 botch diagnostic
- + uip/msh.c: if popd says BBoard-ID: for a message is 0, read it
- + ourselves
- +
- +
- + Fri Jan 3 13:11:03 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/bbc.c: SIGTSTP race condition, #undef for now
- +
- +
- + Sun Jan 5 20:06:03 1986 /mtr (agent: Marshall Rose) <uci@dewey>
- +
- + -- Interface TTI TMA to MH #6.2 --
- + [ N.B.: The TTI TMA is NOT in the public domain; the MH support for
- + the TTI TMA IS in the public domain! ]
- + conf/{mh-gen.8,mhconfig.c,doc/ADMIN.rf}: support "tma on"
- + conf/makefiles/{doc,uip}: ditto
- + Makefile: for the moment
- +
- +
- + Mon Jan 6 15:25:20 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/{msh,mshcmds}.c: work on refile
- + uip/{vmh,msh}.c: support FAST quit (no final refresh on
- + updated mailbox)
- +
- +
- + Tue Jan 7 15:06:05 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/bbc.c: got the SIGTSTP problem, now wait on child to stop prior
- + to stopping ourselves...
- +
- +
- + Wed Jan 8 23:16:10 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/trmsbr.c: better defaults for "li" and "co"
- +
- +
- + Thu Jan 9 15:29:09 1986 /mtr <mrose@nrtc-gremlin>
- +
- + -- Fixes Suggested by Craig Partridge --
- + support/bboards/mmdfII/bboards/mmdfonly.h: if V4_2BSD on, set BSD42
- + conf/doc/{mhl,show}.rf: talk more about moreproc
- + uip/mhlsbr.c: have INTR work as advertised
- + uip/{send,whatnowsbr}.c: link on dist botched, oops!
- +
- +
- + Thu Jan 9 16:31:28 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/mshcmds.c: don't rmm() messages which don't get refiled
- + uip/vmh.c: truncate stuff on Scan window (finally)
- + uip/scansbr.c: work on diagnostics a bit
- +
- +
- + Thu Jan 9 22:37:29 1986 /mtr <mrose@nrtc-gremlin>
- +
- + MH 6.2 is official, awaiting enhancements Berkeley!
- +
- +
- + Fri Jan 10 10:17:57 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/sbboards.c: botch multiple bboard handling (forgot to rewind
- + input, thanks to Larry Henry)
- + support/bboards/mmdfII/bboards/bb_wtmail.c: not handling errors
- + right
- + sbr/cpydgst.c: stay symmetric with change to bb_wtmail.c, the code
- + worked fine, adding matching braces for clarity (!!)
- +
- +
- + Sun Jan 12 14:01:25 1986 /mtr <mrose@nrtc-gremlin>
- +
- + miscellany/mh-e: new version from James Larus
- +
- +
- + Sun Jan 12 22:58:34 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/bbc.c: getbbvis a bit too agressive, use popd algorithm
- +
- +
- + Wed Jan 15 04:43:33 1986 /mtr <mrose@nrtc-gremlin>
- +
- + miscellany/netnews/: more stuff
- +
- +
- + Wed Jan 15 18:44:32 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/addrsbr.c: ismymbox() losing under #ifdef DUMB, oops!
- +
- +
- + Wed Jan 15 19:03:54 1986 /mtr <mrose@nrtc-gremlin>
- +
- + COVER-LETTER: update
- +
- +
- + Wed Jan 15 23:15:54 1986 /mtr <mrose@nrtc-gremlin>
- +
- + support/pop/popsbr.c: pophack on PASS command
- +
- +
- + Fri Jan 17 13:19:23 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/ali.c: add -noalias for RaJ
- +
- +
- + Wed Jan 22 11:13:08 1986 /mtr <mrose@nrtc-gremlin>
- +
- + support/pop/popwrd.c: squash bug
- + h/mh.h: remove sigmask definition
- + uip/{bbc,vmh}.c: add sigmask if not defined in <signal.h>
- + (4.3BSD finally wised up!)
- +
- +
- + Sun Jan 26 16:57:18 1986 /mtr <mrose@nrtc-gremlin>
- +
- + {conf/makefiles/uip,uip/post.c}: lint touch-up
- + conf/doc/{inc,mh-chart,send,post}.rf: add the #ifdef TMA stuff
- + sbr/m_remsg.c: tuning
- + uip/mark.c: re-arrange debug output slightly
- + h/mh.h: add some padding to fix some m_remsg bugs
- + uip/{inc,rcvstore}.c: oops, mp -> hghmsg not keeping pace with
- + m_remsg!
- +
- +
- + Mon Jan 27 17:51:07 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/whatnowsbr.c: forgot to put -[no]push for built-in send
- + h/addrsbr.h, uip/{addrsbr,post}.c: introduce auxformat(), the
- + back-end to adrformat(); post calls auxformat directly in
- + certain cases
- + uip/{dp,forw}.c: was cheating on adrformat, now on auxformat
- +
- +
- + Fri Jan 31 13:25:17 1986 /mtr <mrose@nrtc-gremlin>
- +
- + COVER-LETTER: update
- + support/general/mhl.format: Remove length/width constraints
- +
- +
- + Sun Feb 2 14:01:28 1986 /mtr <mrose@nrtc-gremlin>
- +
- + zotnet/tws/dtime.c: twsort() fix from John Romine for ALTOS
- + uip/addrsbr.c: smarter ismymbox for default case
- + conf/{mh-gen.8,doc/repl.rf}, uip/repl.c: add #ifdef ATHENA code
- +
- +
- + Sun Feb 2 20:47:36 1986 /mtr <mrose@nrtc-gremlin>
- +
- + miscellany/replies/: new directory
- +
- +
- + Mon Feb 3 11:21:49 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/whatnowsbr.c: oops, slight dist botch
- + support/general/mhl.format: make date display user-friendly
- + conf/mh-gen.8: clean-up descriptions of options
- + uip/sbboards.c: normalize code wrt to MMDF-II BBoards channel
- + uip/msh.c: when running under vmh and not in control of TTY,
- + ignore TSTP so BPOP can spool ahead!
- + papers/{usenix/usenix,multifarious/multifarios,trusted/trusted}.tex:
- + fix up banners a bit
- +
- +
- + Wed Feb 5 09:32:08 1986 /mtr <mrose@nrtc-gremlin>
- +
- + support/bboards/mmdfII/READ-ME: update
- +
- +
- + Wed Feb 5 11:25:05 1986 /mtr <mrose@nrtc-gremlin>
- +
- + MH 6.3 #1[UCI] (nrtc-gremlin) is official, still awaiting Berkeley
- + enhancements
- +
- +
- + Wed Feb 5 14:42:55 1986 /mtr <mrose@nrtc-gremlin>
- +
- + zotnet/tws/{tws.h,dtime.c}: new argument to dasctime()
- + uip/{format,pick}sbr.c: make use of it
- +
- +
- + Sun Feb 9 22:14:10 1986 /mtr <mrose@nrtc-gremlin>
- +
- + support/pop/syslog.c: #ifdef BSD43 means use standard syslog
- +
- +
- + Sun Feb 16 15:40:20 1986 /mtr <mrose@nrtc-gremlin>
- +
- + sbr/m_setvis.c: oops, fix-up unseen sequence stuff
- + uip/whatnowsbr.c: oops, a couple of typos
- +
- +
- + Sun Feb 16 19:11:33 1986 /mtr <mrose@nrtc-gremlin>
- +
- + -- Incorporate Berkeley enhancements, courtesy of Van Jacobson --
- + h/{format,scan}sbr.h: updated for new formatsbr stuff
- + h/mh.h: updated for new m_getfld
- + conf/MH: new default file
- + conf/config/config.c: support spost under BERK and SENDMTS
- + conf/mhconfig.c: support new zotnet/fmt/ directory
- + conf/makefiles/uip: support spost
- + conf/makefiles/zotnetM: support new zotnet/fmt/ directory
- + conf/makefiles/zotnet/fmt: new Makefile
- + conf/makefiles/zotnet/tws: support for new lex-based date parser
- + sbr/m_gmsg.c,uip/msh.c: change init of READONLY
- + sbr/m_getfld.c: re-written, super optimized!
- + support/general/{digestcomps,mhl.digest,mhl.forward,scan.*}: use
- + new fmt stuff
- + zotnet/fmt/: new directory
- + zotnet/tws/{dtimep.lex,lexedit.sed,lexstring.c}: new files
- + zotnet/tws/dtime.c: update
- + uip/{forw,scan,scansbr}.c: use new format stuff
- + uip/{inc,mhlsbr,mshcmds,replsbr}.c: use new format stuff
- + uip/trmsbr.c: use stderr for ioctl()s
- + uip/spost.c: new file
- + uip/{addr,format}sbr.c: remove, they're in zotnet/fmt/
- +
- +
- + Sun Feb 16 23:04:34 1986 /mtr <mrose@nrtc-gremlin>
- +
- + zotnet/fmt/: move into sbr/ to avoid loading problems
- + sbr/{addrsbr,formatsbr,fmtcompile,formataddr}.c: new files
- + h/fmtcompile.h: new file
- + conf/makefiles/{sbr,zotnetM}: update
- + sbr/llib-lmh: update
- +
- +
- + Mon Feb 17 20:14:35 1986 /mtr <mrose@nrtc-gremlin>
- +
- + support/general/scan.{time,size}: mday/month inverted
- + sbr/{formatsbr,fmtcompile}.c: bring upto date with MH 6.3+
- + sbr/formatsbr.c: missing tzone/sday/dst handling!
- + h/scansbr.h: slight update
- + uip/scansbr.c: try using formataddr() routine to do "correct"
- + formatting of scan'd addresses, didn't work! use friendly
- + zotnet/tws/dtimep.lex: tsk, use lint! also, fix numeric timezones
- + sbr/addrsbr.c: some ismymbox fixes for non-BERK code (from 6.3)
- + sbr/formatsbr.c: not priming the pump!
- + h/fmtcompile.h, sbr/{formatsbr,fmtcompile}.c: add "friendly"
- + support/general/scan.time2: call it scan.timely
- + conf/makefiles/support/general: support scan.timely
- +
- +
- + Tue Feb 18 01:13:51 1986 /mtr <mrose@nrtc-gremlin>
- +
- + h/formatsbr.h: updates from Van
- +
- +
- + Tue Feb 18 02:15:00 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/bbc.c: upgrade for new m_getfld()
- + support/general/scan.*, h/scansbr.h: still more changes
- + support/general/replcomps: still more changes
- +
- +
- + Tue Feb 18 22:14:51 1986 /mtr <mrose@nrtc-gremlin>
- +
- + sbr/m_getfld.c: eom_action() lacking argument
- + sbr/m_getfld.c: not working right on packf'd files
- + uip/{msh,mshcmds}.c: under BPOP, need to fix things so m_getfld()
- + doesn't dump core!
- +
- +
- + Wed Feb 19 00:16:55 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/dist.c, support/general/distcomps, sbr/fmtcompile.c: updates
- + from Van
- + sbr/formatsbr.c: remove ismymbox prime
- + sbr/fmtcompile.c: use adios(), not exit()!
- +
- +
- + Wed Feb 19 00:56:30 1986 /mtr <mrose@nrtc-gremlin>
- +
- + sbr/m_getfld.c: different fix for packf'd files from Van
- +
- +
- + Wed Feb 19 01:55:40 1986 /mtr <mrose@nrtc-gremlin>
- +
- + h/mh.h: add msg_* vars in m_getfld() as externs
- + uip/{msh,{repl,scan}sbr}.c: remove msg_* declarations
- + sbr/m_getfld.c: add a bit of BODYEOF support (without slowing it
- + down, wouldn't want to upset Van!)
- +
- +
- + Wed Feb 19 03:11:42 1986 /mtr <mrose@nrtc-gremlin>
- +
- + sbr/{formataddr,fmtcompile,m_{draft,getfld,maildir},printsw,pwd}.c:
- + lint it
- + uip/{formatsbr,forw,msh,replsbr,scan,scansbr,spost}.c: lint it
- + support/pop/popser.c: lint it
- + sbr/formatsbr.c: remove MHFMTDEBUG code
- + */Makefile: depend 'em
- +
- +
- + Wed Feb 19 10:50:04 1986 /mtr <mrose@nrtc-gremlin>
- +
- + papers/mh6.4: new interim documentation directory, for 4.3BSD
- + conf/doc/{MH,ap,dp,mh,mh-chart,mhl,repl,scan}.rf: update
- + conf/doc/mh-format.rf: new file
- + support/general/replcomps: oops, should call formataddr on all
- + addrs
- +
- +
- + Thu Feb 20 08:07:49 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/{a,d}p.c: start working on it
- + h/formatsbr.h: new variable fmt_norm
- + sbr/formatsbr.c: use it
- + h/fmtcompile.c, sbr/{fmtcompile,formatsbr}.c: define "pretty"
- + sbr/formataddr.c: sight touch-up
- + uip/formatsbr.c: oops, bug in PUTD()
- + uip/{fmtcompile,formatsbr}.c: init mn structures in case of error.
- + This is still buggy since: 1) the structure still doesn't get
- + reset on errors, and 2) you can still dereference nulls
- + zotnet/tws/dtimep.lex: slight touch-up
- +
- +
- + Thu Feb 20 19:55:20 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/mhlsbr.c: add formatsbr support
- + sbr/addrsbr.c: use better default matching in ismymbox
- + miscellany/mtrenv: update
- + support/general/mhl.*: update
- +
- +
- + Thu Feb 20 22:57:33 1986 /mtr <mrose@nrtc-gremlin>
- +
- + MH 6.4 #1[UCI] (nrtc-gremlin) made available to Van Jacobson
- + for inclusion in 4.3BSD UNIX
- +
- +
- + Sun Feb 23 13:59:46 1986 /mtr <mrose@nrtc-gremlin>
- +
- + sbr/m_gmsg.c: big bug fix from Terry West. Thanks, Terry!
- + h/strings.h: System5 bcopy-equivalents from Doug Gwyn
- + zotnet/tws/tws.h: support #ifdef ATZ
- + conf/makefiles/uip: slight lint botch
- +
- +
- + Mon Feb 24 17:14:39 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/inc.c: have -host/-file ask if file doesn't exist
- + uip/{packf,mshcmds}.c: ditto
- +
- +
- + Tue Feb 25 08:08:43 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/burst.c: another realloc() fix from Terry West
- + sbr/vfgets.c: ditto
- + support/pop/popser.c: enhancmenets from Dave Cohrs
- + conf/doc/pop5.rf: document it
- + conf/mhconfig.c: support "debug" directive
- + makefiles/*: use it
- +
- +
- + Tue Feb 25 09:47:09 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/{scan,mshcmds}.c: slight touch-ups
- + uip/mhlsbr.c: fix up SIGPIPE handling, again
- + support/general/scan.time: fix up for numeric timezone
- + uip/scansbr.c: re-support "encrypted"
- + uip/msh.c: add "exit" command for Dave Farber
- + miscellany/convert: new directory
- +
- +
- + Tue Feb 25 17:45:28 1986 /mtr <mrose@nrtc-gremlin>
- +
- + h/mshsbr.h, uip/msh*.c: add direct folder support for symmetry's
- + sake, ugh!
- +
- +
- + Wed Feb 26 21:05:46 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/sendsbr.c: better diagnostics when post fails
- +
- +
- + Thu Feb 27 22:12:53 1986 /mtr <mrose@nrtc-gremlin>
- +
- + -- Van sends updates --
- + conf/makefiles/uip, h/fmtcompile.h,
- + sbr/{format{addr,sbr},fmtcompile,addrsbr}.c,
- + support/general/replcomps, uip/{repl,mhl,scan,whatnow}sbr.c
- +
- +
- + Thu Feb 27 22:16:43 1986 /mtr <mrose@nrtc-gremlin>
- +
- + sbr/formataddr.c: remove <strings.h>
- + sbr/addrsbr.c: Van doesn't like "user*" instead of "user" as the
- + default is-my-mailbox for BERK. Since he's the BERK-author, I'll
- + assume he knows what he's doing...
- + support/general/replcomps: Use "tws", instead of "pretty" for
- + in-reply-to:
- + uip/whatnowsbr.c: If -draft{folder,message} and -nodraftfolder are
- + added as no-ops, make them "hidden" from -help output
- + uip/{{a,d}p,forw,mhlsbr}.c: update
- +
- +
- + Mon Mar 3 10:18:40 1986 /mtr <mrose@nrtc-gremlin>
- +
- + -- Van sends fixes to my updates --
- + uip/mshcmds.c: not resetting scansbr for formatting
- + uip/scansbr.c: oops, typo!
- +
- +
- + Mon Mar 3 16:53:19 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/sendsbr.c: oops, close() on an uninitialized variable! (thanks
- + to Jim Koda)
- +
- +
- + Tue Mar 4 08:15:17 1986 /mtr <mrose@nrtc-gremlin>
- +
- + -- Van sends fixes to my updates --
- + uip/mhlsbr.c: not resetting mhlsbr for formatting
- + zotnet/tws/dtimep.lex: not getting MIL-TZ's right
- +
- +
- + Tue Mar 4 09:53:31 1986 /mtr <mrose@nrtc-gremlin>
- +
- + papers/usenix/: change to realwork/
- +
- +
- + Wed Mar 5 12:48:58 1986 /mtr <mrose@nrtc-gremlin>
- +
- + dist/READ-ME: oops, forgot usenix name change
- + conf/makefiles/uip: hmm, interesting loader problem
- +
- +
- + Thu Mar 6 13:36:26 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/addrsbr.c: yet another fix for ismymbox()
- + uip/replsbr.c: #ifdef ISI code to avoid duplicate replies (due to
- + Jim Koda)
- +
- +
- + Sun Mar 9 14:04:26 1986 /mtr <mrose@nrtc-gremlin>
- +
- + conf/mh-gen.8: add a line about chown and sys5
- + sbr/m_convert.c: better BADRNG diagnostic
- + uip/mshcmds.c: oops, typo
- +
- +
- + Sun Mar 9 14:06:54 1986 /mtr <mrose@nrtc-gremlin>
- +
- + h/scansbr.h, sbr/fmtcompile.c: better versions from Van
- + support/general/{replcomps,scan.timely}: better versions from Van
- + (snuck the %pretty instead of %tws in, eh Van?)
- + support/general/{digestcomps,mhl.forward,scan.{size,time}}: update
- +
- +
- + Sun Mar 9 18:52:37 1986 /mtr <mrose@nrtc-gremlin>
- +
- + h/scansbr.h, support/general/{digestcomps,mhl.forward,scan.*}: update
- +
- +
- + Sun Mar 9 20:09:35 1986 /mtr <mrose@nrtc-gremlin>
- +
- + zotnet/bboards/bboards.h: add BB_REMOTE flag for bbc
- + uip/bbc.c: support BB_REMOTE, under #ifdef MTR for the moment
- + uip/bbc.c: allow bb_aka (again?!?)
- +
- +
- + Mon Mar 10 00:43:19 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/{msh,mshcmds}.c: packf hack, ala refile hack
- + uip/{post,rcvdist}.c, support/bboards/mmdfII/bboards/bb_wtmail.c:
- + MMDF-II nameserver support from Steve Kille
- +
- +
- + Mon Mar 10 10:17:29 1986 /mtr <mrose@nrtc-gremlin>
- +
- + {sbr/formatsbr,uip/scansbr}.c: more optimizations from Van!
- + sbr/m_getfld.c: Van fixes problems due to losing vanilla-4.2 C
- + optimizer!
- + sbr/m_getfld.c: slight touch-up by MTR
- + uip/bbc.c: remove #ifdef MTR bracketing, code works fine
- + uip/refile.c: slight touch-ups
- + sbr/m_getfld.c: on xxxERR returns, forgetting to zero value buffer
- +
- +
- + Mon Mar 10 18:08:37 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/post.c: fix handling of (in)visible addresses
- + uip/rcvdist.c: re-do to use format facility
- + uip/{replsbr,forw}.c: touch-ups
- + conf/config/config.c, h/mh.h: new variable rcvdistcomps
- + conf/{makefiles/{uip,support/general},doc/mhook.rf}: update
- + sbr/m_getfld.c: bstring() support for non BSD42, SYS5 systems
- + conf/doc/ADMIN.rf: update
- +
- +
- + Tue Mar 11 19:43:27 1986 /mtr <mrose@nrtc-gremlin>
- +
- + h/dropsbr.h, uip/dropsbr.c: new routines mbx_read() and mbx_write()
- + uip/{msh,mshcmds}.c, support/pop/popser.c: use it
- + h/{addr,format,scan}sbr.h, sbr/addrsbr.c: slight touch-up
- + uip/inc.c: slight touch-up
- +
- +
- + Sun Mar 16 15:20:27 1986 /mtr <mrose@nrtc-gremlin>
- +
- + miscellany/mem: appointment diary support from Ken Yap
- +
- +
- + Wed Mar 19 23:00:53 1986 /mtr <mrose@nrtc-gremlin>
- +
- + support/pop/popser.c: one last fix for ENOENT mailboxes
- +
- +
- + Wed Mar 19 23:12:54 1986 /mtr <mrose@nrtc-gremlin>
- +
- + -- Changes for MMDF-IIb --
- + uip/post.c, support/bboards/mmdfII/bboards/bb_wtmail.c: know about
- + new mm_winit protocol and RP_NS/RP_DOK responses
- +
- +
- + Thu Mar 20 23:05:10 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/mhlsbr.c: mhl enhancement from JLR permitting a prefix string
- + for each line of the body (e.g, "component=" > ")
- +
- +
- + Fri Mar 21 21:12:39 1986 /mtr <mrose@nrtc-gremlin>
- +
- + conf/doc/{MH,mh-format}.rf: typos
- +
- +
- + Sat Mar 22 11:51:45 1986 /mtr <mrose@nrtc-gremlin>
- +
- + -- Fixes from Phyllis Kantar --
- + uip/dropsbr.c: typo
- + conf/doc/{send,pick}.rf: typos
- + conf/makefiles/doc: forgot $(OPTIONSn) in $(MAN1) definition
- +
- +
- + Sat Mar 22 18:24:35 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/mhmail.c: handle -body better
- +
- +
- + Mon Mar 31 15:07:26 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/replsbr.c: handle bad addresses with better diagnostics
- +
- +
- + Wed Apr 2 17:17:32 1986 /mtr <mrose@nrtc-gremlin>
- +
- + sbr/addrsbr.c: slight typo in comment
- +
- +
- + Sun Apr 6 19:22:52 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/inc.c: forgot to initialize some FILE*'s; dumps core on
- + celerity
- +
- +
- + Mon Apr 7 09:55:23 1986 /mtr <mrose@nrtc-gremlin>
- +
- + mts/sendmail/smail.c: slight "client" check
- +
- +
- + Wed Apr 9 12:04:56 1986 /mtr <mrose@nrtc-gremlin>
- +
- + -- Van fixes some more bugs --
- + sbr/m_getfld.c: not handling buffer boundary cases right
- + uip/replsbr.c: not adding "," correctly when concatenating an
- + address string during message scan
- + sbr/formatsbr.c: mymbox test dumped core if address parse failed
- + h/{fmtcompile,formatsbr}.h, sbr/{fmtcompile,formatsbr}.c: more
- + enhancements
- +
- +
- + Wed Apr 9 12:36:58 1986 /mtr <mrose@nrtc-gremlin>
- +
- + -- MTR actually gets to fix something! --
- + sbr/m_getfld.c: messages with an empty body caused inc to
- + prematurely think the maildrop had reached EOF. Believe it
- + or not, the mhmail fix last month exercised this!
- +
- +
- + Wed Apr 9 22:08:37 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/vmh.c: output non-standard control characters in carat format
- +
- +
- + Thu Apr 10 02:26:52 1986 /mtr <mrose@nrtc-gremlin>
- +
- + Makefile: touch-up "make distribution"
- + conf/examples/nrtc-*-mtr: remove
- + conf/makefiles/uip: touch-up
- + conf/doc/MH.rf: add TMA stuff, conditionally
- +
- +
- + Thu Apr 10 03:47:48 1986 /mtr <mrose@nrtc-gremlin>
- +
- + sbr/m_getfld.c: Van fixes Marshall's fix
- +
- +
- + Thu Apr 10 10:42:25 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/scansbr.c: recognize the 822 "Encrypted:" header instead of
- + doing a uprf() on the body
- + uip/{scan,mshcmds}.c: recognize SCNENC return from scan ()
- +
- +
- + Thu Apr 10 15:06:59 1986 /mtr <mrose@nrtc-gremlin>
- +
- + conf/config/bboards.*: mail reports to PostMaster
- +
- +
- + Sat Apr 12 16:32:21 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/post.c: try to keep fcc:s under MH-directory so links are
- + maintained
- +
- +
- + Mon Apr 14 22:56:46 1986 /mtr <mrose@nrtc-gremlin>
- +
- + support/bboards/bbexp.c: not ending msh correctly, msh tried
- + to update the maildrop even though it was already locked
- + by bbexp
- +
- +
- +
- + Mon Apr 14 23:52:03 1986 /mtr <mrose@nrtc-gremlin>
- +
- + sbr/m_getfld.c: locc() not range checking on cnt
- +
- +
- + Thu Apr 17 13:25:20 1986 /mtr <mrose@nrtc-gremlin>
- +
- + sbr/addrsbr.c: fix from Terry West, more alternate-mailbox misery
- +
- +
- + Thu Apr 17 20:51:53 1986 /mtr <mrose@nrtc-gremlin>
- +
- + zotnet/mts/lock.c: add some more #ifdefs to support stand-alone
- + locking library
- + conf/examples/udel*: update
- + papers/myths/: remove
- + conf/makefile/papers: update
- +
- +
- + Mon Apr 21 10:22:09 1986 /mtr <mrose@nrtc-gremlin>
- +
- + zotnet/mf/mf.c: sanity check in getadrx() on string to parse
- +
- +
- + Mon Apr 21 17:31:43 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/{inc,post}.c: slight mods for TMA mods
- + conf/doc/mh-chart.rf: ditto
- +
- +
- + Thu Apr 24 00:19:35 1986 /mtr <mrose@nrtc-gremlin>
- +
- + conf/doc/mh-chart.rf: slight mods for TMA mods
- +
- +
- + Thu Apr 24 10:34:06 1986 /mtr <mrose@nrtc-gremlin>
- +
- + zotnet/mts/lock.c: lint touch-up
- + support/pop/popd.c: ditto
- +
- +
- + Thu Apr 24 19:37:09 1986 /mtr <mrose@nrtc-gremlin>
- +
- + conf/doc/ADMIN.rf: typos
- +
- +
- + Thu Apr 24 20:13:28 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/msgchk.c: print out last read date
- + conf/makefiles/uip: add tws dependency
- +
- +
- + Thu Apr 24 23:53:57 1986 /mtr <mrose@nrtc-gremlin>
- +
- + -- From Craig Partridge --
- + support/bboards/mmdfII/bboards/*: bug fixes for MMDF-IIb
- + conf/mh-gen.8: mention that MMDF-IIb has the BBoards distribution
- +
- +
- + Fri Apr 25 00:01:50 1986 /mtr <mrose@nrtc-gremlin>
- +
- + conf/ADMIN.rf: slight touch-up
- +
- +
- + Fri Apr 25 10:47:19 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/trmsbr.c: use stdout (not stderr) for termcap checking
- +
- +
- + Fri Apr 25 13:39:55 1986 /mtr <mrose@nrtc-gremlin>
- +
- + -- From Craig Partridge --
- + support/bboards/mmdfII/bboards/getbbent.c: bad field in BBoards file
- + causes hang, note it and skip!
- +
- +
- + Sun Apr 27 17:23:56 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/scansbr.c: recognition of 822 Encrypted: header a bit botched
- + h/scansbr.h, support/general/scan.*: support encrypted
- +
- +
- + Mon Apr 28 21:00:21 1986 /mtr <mrose@nrtc-gremlin>
- +
- + -- Yet Another Fix from Terry --
- + uip/dropsbr.c: another typo
- +
- +
- + Tue Apr 29 20:17:11 1986 /mtr <mrose@nrtc-gremlin>
- +
- + conf/doc/mhook.rf: extra tip with SendMail and slocal
- +
- +
- + Thu May 1 15:30:07 1986 /mtr <mrose@nrtc-gremlin>
- +
- + -- From Craig Partridge --
- + support/pop/mmdfII/pop/READ-ME: fixes
- +
- +
- + Fri May 2 16:35:11 1986 /mtr <mrose@nrtc-gremlin>
- +
- + -- More Bug Fixes from Van --
- + uip/scansbr.c: check return from fclose()
- + uip/inc.c: avoid locking/stat race condition
- + sbr/m_sync.c: lock signals out during update of sequences
- +
- +
- + Fri May 2 17:02:01 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/show.c: WHATNOW botch fixed by Jim Valerio
- +
- +
- + Sat May 3 01:37:15 1986 /mtr <mrose@nrtc-gremlin>
- +
- + sbr/{m_{sync,update},pidwait}.c, uip/{bbc,sendsbr,vmh}: inspired
- + by Van's 4.2BSD signal optimizations
- +
- +
- + Sat May 3 02:49:29 1986 /mtr <mrose@nrtc-gremlin>
- +
- + zotnet/tws/{tws.h,dtime.c,dtimep.lex}: fixes for DST
- + conf/makefiles/zotnet/tws: add -n to lex's invocation
- +
- +
- + Sun May 4 13:28:23 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/msgchk.c: change the "last read" message to use alpha-timezones
- +
- +
- + Sun May 4 14:18:15 1986 /mtr <mrose@nrtc-gremlin>
- +
- + support/general/replcomps: use %tws instead of %pretty
- + support/general/mhl.*: streamline slight
- +
- +
- + Sun May 4 16:10:36 1986 /mtr <mrose@nrtc-gremlin>
- +
- + conf/doc/mh.rf: forgot about TMA stuff
- + conf/makefiles/doc: forgot rcvstore
- +
- +
- + Sun May 4 17:49:43 1986 /mtr <mrose@nrtc-gremlin>
- +
- + sbr/pidwait.c, uip/{bbc,sendsbr,vmh}.c: back off signal handling
- + modifications
- +
- + Sun May 4 18:08:47 1986 /mtr <mrose@nrtc-gremlin>
- +
- + MH 6.5 #1[UCI] (nrtc-gremlin) made available to Van Jacobson
- + for inclusion in 4.3BSD UNIX
- +
- +
- + Mon May 5 13:32:37 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/trmsbr.c: try Van's version for a while
- + miscellany/patch: updates from Van
- +
- +
- + Mon May 5 16:07:12 1986 /mtr <mrose@nrtc-gremlin>
- +
- + support/bboards/mmdfII/bboards/bb_wtmail.c: patch for IDIOTIC change
- + in qu_rtxt()
- +
- +
- + Wed May 7 13:16:45 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/post.c: modification for fcc:s broke stand-alone behavior for
- + daemons, etc.; use old method as a fall-back
- + sbr/m_foil.c: also improve modification a bit
- + support/pop/smtpd.c: dead weight
- +
- +
- + Thu May 8 17:50:22 1986 /mtr <mrose@nrtc-gremlin>
- +
- + support/bboards/bbexp.c: set the mode on the archive file if
- + creating it, since m_gmprot() isn't a good default for this
- + application
- +
- +
- + Sun May 11 12:40:34 1986 /mtr <mrose@nrtc-gremlin>
- +
- + miscellany/scripts/READ-ME: add amhmail description
- + miscellany/scripts/amhmail.sh: new script
- +
- +
- + Mon May 12 09:12:39 1986 /mtr <mrose@nrtc-gremlin>
- +
- + sbr/m_getfld.c: new version of matchc() from Van that doesn't
- + give the SUN indigestion
- +
- +
- + Tue May 13 07:59:36 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/replsbr.c: some fixes from Van
- +
- +
- + Tue May 13 15:14:07 1986 /mtr <mrose@nrtc-gremlin>
- +
- + -- Some Fixes from Hokey --
- + uip/vmh.c: a few more SYS5 dependencies
- + zotnet/tws/dtimep.lex: added #include strings.h
- + conf/makefiles/zotnet/tws: added dependency for above
- + uip/post.c: pre-emptive reference of discard to help SYS5 loader
- + conf/examples/plus5: update
- + miscellany/less/Makefile: add SHELL=/bin/sh
- + sbr/m_getfld.c: slight redeclaration for SYS5
- +
- +
- + Tue May 13 17:44:47 1986 /mtr <mrose@nrtc-gremlin>
- +
- + sbr/{fmtcompile,formatsbr}.c, support/pop/popwrd.c,
- + uip/{ap,inc,rcvtty,post,spost,whatnowsbr}.c:
- + add some lint stuff
- + conf/makefiles/uip: better lint support for TMA
- +
- +
- + Thu May 15 16:36:19 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/{inc,msgchk,post,send}.c: improve #define-dependent
- + switches declarations
- +
- +
- + Thu May 15 17:09:34 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/msgchk.c, conf/doc/{mh-chart,msgchk}.rf: add -[no]date,
- + and -[no]notify type switches
- +
- +
- + Tue May 20 19:09:15 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/scan.c: free'ing a static, tsk
- +
- +
- + Tue May 20 22:51:13 1986 /mtr <mrose@nrtc-gremlin>
- +
- + -- From Steve Smith --
- + conf/examples/ridge: config file
- + sbr/{m_gmsg,pwd}.c: although SYS5, uses <ndir.h>
- + uip/show.c: not null-terminating argvector
- + uip/{bbc,vmh}.c: although SYS5, has SIGTSTP
- + uip/sbboards.c: pre-emptive reference of discard to help SYS5 loader
- + conf/{mh-gen.8,mhconfig.c}: add "oldload none"
- +
- +
- + Wed May 21 10:10:21 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/{rcvdist,replsbr}.c: malloc/free fixes from Steve Smith
- +
- +
- + Wed May 21 20:51:47 1986 /mtr <mrose@nrtc-gremlin>
- +
- + conf/{mh-gen.8,doc/{ADMIN,MH}.rf, papers/*/*, COVER-LETTER: update
- + mail addresses
- +
- +
- + Thu May 22 08:05:03 1986 /mtr <mrose@nrtc-gremlin>
- +
- + -- Two New Documents from UCI --
- + conf/makefiles/{papers,dist}: update
- + dist/READ-ME: remove
- + conf/doc/MH.rf: update
- + papers/beginners: new paper "MH for Beginners"
- + papers/mh4mm: new paper "MH for MM Users"
- +
- +
- + Thu May 22 08:13:17 1986 /mtr <mrose@nrtc-gremlin>
- +
- + conf/mh-gen.rf: update
- +
- +
- + Thu May 22 15:08:06 1986 /mtr <mrose@nrtc-gremlin>
- +
- + support/general/replcomps: typo
- +
- +
- + Tue May 27 19:35:38 1986 /mtr <mrose@nrtc-gremlin>
- +
- + support/pop/popd.c: support for 4.3BSD syslog
- +
- +
- + Wed May 28 12:44:21 1986 /mtr <mrose@nrtc-gremlin>
- +
- + sbr/fmtcompile.c: allow literal '%'s in format files
- +
- +
- + Wed May 28 16:56:40 1986 /mtr <mrose@nrtc-gremlin>
- +
- + conf/examples/nrtc-gremlin: add -125 switch for GHS compiler
- + sbr/getans.c,uip/{mhlsbr,prompter,rcvtty,sendsbr}.c: a bit more
- + careful with the setjmp()
- +
- +
- + Thu May 29 23:42:54 1986 /mtr <mrose@nrtc-gremlin>
- +
- + support/general/scan.mailx: mailx scan format from Bob Simpson of
- + plus5
- + support/general/mhl.body: format from mtrenv
- +
- +
- + Sun Jun 1 23:07:24 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/trmsbr.c: add sc_hardcopy()
- + uip/mhlsbr.c: use it so we don't fork a more on hardcopy ttys
- + conf/doc/mhl.rf: document it
- +
- +
- + Fri Jun 6 10:56:40 1986 /mtr <mrose@nrtc-gremlin>
- +
- + miscellany/less/screen.c: handle HP terminals better
- +
- + Tue 10 Jun 86 15:34 John Romine <jromine@nrtc-gremlin>
- +
- + h/scansbr.h: eliminate superfluous space from default format
- + string
- +
- +
- + Fri 13 Jun 86 10:29 John Romine <jromine@nrtc-gremlin>
- +
- + h/scansbr.h, support/general/scan.{timely,time,size}: add ">>" at
- + end of body in format string
- +
- +
- + Fri Jun 13 15:28:10 1986 /mtr <mrose@nrtc-gremlin>
- +
- + sbr/addrsbr.c: another #ifdef BERK fix for the SUN
- +
- +
- + Fri Jun 13 20:08:36 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/aliasbr.c: not testing for relative names correctly
- +
- +
- + Sun Jun 15 14:20:10 1986 /mtr <mrose@nrtc-gremlin>
- +
- + h/scansbr.h, support/general/scan.{timely,time,size}: remove JLR's
- + fix since it doesn't work right
- +
- +
- + Mon Jun 16 19:56:09 1986 /mtr <mrose@nrtc-gremlin>
- +
- + sbr/{m_gmsg,pwd}.c, uip/{bbl,conflict,folder,rmf}.c: add NDIR
- + compile-time option if -lndir include file is called <ndir.h>
- + instead of <dir.h> (non BSD systems)
- + h/local.h: new file to make this easier
- +
- +
- + Tue Jun 17 10:44:06 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/trmsbr.c: no TIOCGWINSZ working on 4.2BSD ULTRIX!
- +
- +
- + Tue Jun 17 14:21:08 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/scan.c: forgot to make -header always force ATZ behavior
- +
- +
- + Tue Jun 17 15:23:27 1986 /mtr <mrose@nrtc-gremlin>
- +
- + h/mh.h: add vfork for hpux
- +
- +
- + Wed Jun 18 11:05:40 1986 /mtr <mrose@nrtc-gremlin>
- +
- + support/bboards/bbexp.c: create archives in BBMODE format, private
- + bboards should have archives created by the BBoards user (just
- + like the standard file)
- +
- +
- + Wed Jun 18 19:57:09 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/vmh.c: sanitize for 8-bit whacko characters
- +
- +
- + Thu Jun 19 19:51:43 1986 /mtr <mrose@nrtc-gremlin>
- +
- + zotnet/tws/dtimep.lex: fix spelling for august
- +
- +
- + Mon Jun 23 20:45:35 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/vmh.c: Bob gives us another sys5 fix
- +
- +
- + Sun Jun 29 21:11:30 1986 /mtr <mrose@nrtc-gremlin>
- +
- + sbr/addrsbr.c: yet another fix for the SUN (yaffts)
- + conf/mhconfig.c: if both mts/smtp and options BERK, turn off
- + SMTP
- +
- +
- + Tue Jul 8 10:50:39 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/scansbr.c: split-up a statement for the RT compiler
- + conf/mh-gen.8: add some stuff on POP
- + conf/doc/{ADMIN,popaka}.rf: ditto
- +
- +
- + Fri Jul 11 10:50:31 1986 /mtr <mrose@nrtc-gremlin>
- +
- + MH 6.5 official, out of beta, released for UCI distribution
- +
- +
- + Tue Jul 15 20:26:05 1986 /mtr <mrose@nrtc-gremlin>
- +
- + papers/{bboards/bboards,tutorial/tutorial}.tex: botched MTR's
- + address
- +
- +
- + Sun Jul 27 11:52:37 1986 /mtr <mrose@nrtc-gremlin>
- +
- + conf/doc/show.rf: typos
- +
- +
- + Fri Aug 8 12:57:35 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + conf/config/config.c, h/mh.h, sbr/m_readefs.c, uip/mhlsbr.c:
- + add support for "faceproc"
- +
- +
- + Mon Aug 11 10:10:33 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + uip/mhlsbr.c: choose default face from from: line
- +
- +
- + Tue Aug 12 10:53:47 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + uip/mhlsbr.c: finally stabilize it
- +
- +
- + Tue Aug 12 10:54:47 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + support/pop/popser.c: small fix from Dave Cohrs
- +
- +
- + Thu Aug 14 22:25:23 1986 /mtr <mrose@nrtc-gremlin>
- +
- + support/general/replcomps: add return-path to To: list
- +
- +
- + Fri Aug 15 13:58:25 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + uip/vmh.c: slight clean-up
- +
- +
- + Fri Aug 15 23:01:06 1986 /mtr <mrose@nrtc-gremlin>
- +
- + sbr/advertise.c: slight touch-up
- +
- +
- + Mon Aug 18 10:38:34 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + uip/wmh.c: new program--Windowing MH for Integrated Solutions
- + Graphics Workstations; not standardly installed for now since
- + requires special load libraries
- + conf/doc/wmh.rf: man page
- + conf/makefiles/uip: support wmh
- +
- +
- + Wed Aug 20 14:16:12 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + conf/config/MakeBBoards: smarter rule
- +
- +
- + Wed Aug 20 17:23:39 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + uip/mhlsbr.c: a bit less demanding on errors when processing the
- + face
- +
- +
- + Thu Aug 28 19:39:47 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + uip/send.c: handle dist in a read-only folder
- + support/pop/popser.c: anonymous fix for DPOP/BPOP
- +
- +
- +
- + Fri Aug 29 09:08:15 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + uip/wmh.c: for pTTY() make original window the top one
- +
- +
- + Tue Sep 2 15:27:34 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/{bbc,burst,popsbr}.c: ULTRIX loses on ferror() vs. feof()
- + sbr/vfgets.c: ditto
- +
- +
- +
- + Fri Sep 5 09:08:17 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + mts/sendmail/smail.c: define discard() as void
- +
- +
- + Fri Sep 5 09:40:35 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + uip/msh.c: add hidden "advance" command
- + uip/wmh.c: use it
- +
- +
- + Fri Sep 5 14:02:36 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + zotnet/bboards/bboards.h: add BB_SEEN to fix list-handling bug in bbc
- + uip/bbc.c: use it
- +
- +
- + Mon Sep 8 12:47:58 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + conf/config/MakeBBoards: smarter
- +
- +
- + Thu Oct 2 12:37:57 1986 /mtr <mrose@nrtc-gremlin>
- +
- + support/pop/popd.c: fixes for 4.3BSD set setsockopt
- +
- +
- + Mon Oct 6 12:07:02 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + conf/examples/encore: config file for Encore Multimax, from Mike
- + Iglesias of UCI
- +
- +
- + Wed Oct 8 15:59:05 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + uip/vmh.c: more SYS5 mods from Bob Desinger
- +
- +
- + Thu Oct 9 12:52:41 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + h/mh.h: make ruserpass nonsense based on NFS not SUN
- +
- +
- + Thu Oct 30 12:57:52 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + sbr/formataddr.c, uip/replsbr.c: another realloc() bug found by
- + Terry West
- +
- +
- + Thu Oct 30 13:03:02 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + uip/{rcvtty,ttyw}.c: if no BSD42, turn off TTYD
- +
- +
- + Mon Nov 3 14:11:48 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + uip/msgchk.c: another SUN fix
- +
- +
- + Mon Nov 3 15:21:38 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + sbr/m_sync.c: fix for sequent machines
- +
- +
- + Mon Nov 10 08:12:16 1986 /mtr <mrose@nrtc-gremlin>
- +
- + -- Stuff from Jef Poskanzer --
- + uip/forw.c: add -[no]dashmunging, a hidden option
- + uip/mhlsbr.c: add -[no]dashmunging, a hidden option
- + {conf/doc/mhl.rf,uip/mhlsbr.c}: add [no]split variable
- +
- +
- + Mon Nov 10 16:57:41 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + -- More stuff from Jef --
- + zotnet/tws/dtimep.lex: default timezone to localone one
- +
- +
- + Fri Nov 14 17:25:23 1986 /mtr <mrose@nrtc-gremlin>
- +
- + conf/doc/mhook: typo found by Phyl
- +
- +
- + Fri Nov 21 14:33:28 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + sbr/smatch.c: deref null bug
- +
- +
- + Sat Nov 22 20:36:31 1986 /mtr <mrose@nrtc-gremlin>
- +
- + uip/bbc.c: set up time-bomb after HUP
- +
- +
- + Tue Dec 2 13:57:41 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + support/bboards/bbtar.c: fix for sequent machines
- +
- +
- + Wed Dec 3 22:03:58 1986 /mtr <mrose@nrtc-gremlin>
- +
- + support/pop/popd.c: minor fix
- +
- +
- + Mon Dec 15 11:11:32 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + uip/post.c: patch for MMDF-IIb submit
- +
- +
- + Mon Dec 22 12:32:45 1986 /mtr (agent: Marshall Rose) <mother@killer-rat>
- +
- + -- From Stanford --
- + h/dropsbr.h, uip/dropsbr.c, support/pop/popser.c: support LAST
- + command in POP service
- + uip/{inc,mshcmds}.c: ditto
- +
- +
- + Fri Jan 2 18:42:55 1987 /mtr <mrose@nrtc-gremlin>
- +
- + uip/dropsbr.c: fixes
- + uip/msh.c, support/pop/popser.c: ditto
- +
- +
- + Fri Jan 2 18:43:09 1987 /mtr <mrose@nrtc-gremlin>
- +
- + zotnet/tws/dtimep.lex: ctime w/o TZ hack
- +
- +
- + Fri Jan 2 23:41:19 1987 /mtr <mrose@nrtc-gremlin>
- +
- + uip/rcvdist.c: touch-ups to sync with replsbr.c
- + uip/scansbr.c: trash trailing whitespace in header components for
- + formating
- +
- +
- + Sat Jan 3 13:11:22 1987 /mtr <mrose@nrtc-gremlin>
- +
- + conf/config/mts.c, mts/sendmail/hosts.c: BIND fix-up
- +
- +
- + Sat Jan 3 15:03:00 1987 /mtr <mrose@nrtc-gremlin>
- +
- + h/formatsbr.h: parenthesize better, use case-sensitive in
- + bucket search since hashing is case-sensitive
- + uip/{rcvdist,replsbr}.c: CT_ADDR hacks
- +
- +
- + Sun Jan 4 11:16:54 1987 /mtr <mrose@nrtc-gremlin>
- +
- + uip/mhlsbr.c: "extras" hack for Elz
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- papers/changes/Makefile Wed Dec 2 14:00:15 1992
- ***************
- *** 0 ****
- --- 1,46 ----
- + ##############################################################################
- + # @(#)$Id: Makefile,v 1.4 1992/12/02 22:00:09 jromine Exp $
- +
- + MAKE = make DESTDIR=$(DESTDIR) $(MFLAGS) -k
- + SHELL = /bin/sh
- +
- +
- + ##############################################################################
- + # Generation Rules
- + ##############################################################################
- +
- + .SUFFIXES: .ms .cat .doc .imp
- +
- + .ms.cat:; itroff -t -ms $< > $@
- +
- + .ms.doc:; nroff -ms $< > $@
- +
- + .cat.imp:; catimp -i $@ $<
- +
- +
- + ######################################################################
- + # Here it is...
- + ######################################################################
- +
- + TARGETS = mh-changes.doc
- +
- + all: mh-changes.doc
- +
- +
- + doc: mh-changes.doc
- +
- + i-all: all true
- + lpr -t -J MH-changes mh-changes.cat
- +
- + true:;
- +
- + ##############################################################################
- + # Miscellaneous tasks
- + ##############################################################################
- +
- + distribution: clean
- +
- + unconfig clean: unclean
- + rm -f *.cat *.dvi *.imp *.doc
- +
- + unclean:; rm -f *.tmp _* :* core
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- papers/changes/mh-changes.ms Mon Dec 14 16:25:37 1992
- ***************
- *** 0 ****
- --- 1,1010 ----
- + .\" @(#)$Id: mh-changes.ms,v 1.25 1992/12/15 00:25:33 jromine Exp $
- + .\" Standard -ms macros
- + .\" with the following changes
- + .ds lq \\*Q
- + .ds rq \\*U
- + .\" remember to update date in text below
- + .DA "December 14, 1992"
- + .if n \{\
- + .na
- + .\}
- + .nr PO 1i
- + .po 1i
- + .\" .EH ''Changes to MH 6.7'%'
- + .\" .OH ''Changes to MH 6.7'%'
- + .ds LH Changes to MH 6.8
- + .ds CH
- + .ds RH %
- + .TL
- + Changes to
- + .br
- + The RAND MH Message Handling System:
- + .br
- + UCI version MH 6.8
- + .AU
- + John L. Romine
- + .AI
- + Computing Support Group
- + Department of Information and Computer Science
- + University of California, Irvine
- + Irvine, CA 92717\-3425
- + .AB
- + .PP
- + This document describes the changes to the
- + UCI version of the RAND MH system from MH 6.6
- + to this release of MH 6.8.
- + This document is meant to supplement,
- + not supersede,
- + the standard MH User's manual and MH Administrator's manual.
- + .PP
- + Comments concerning this documentation should be addressed to the
- + mailbox \fBBug\-MH@ICS.UCI.EDU\fP, or \fBucbvax!ucivax!bug-mh\fP.
- + .AE
- + .SH
- + ACKNOWLEDGEMENTS
- + .LP
- + The \fIMH\fP system described herein is
- + based on the original RAND \fIMH\fP system.
- + It has been extensively developed (perhaps too much so) by Marshall T. Rose
- + and John L. Romine at the University of California, Irvine.
- + Einar A. Stefferud, Jerry N. Sweet,
- + and Terry P. Domae provided numerous suggestions
- + to improve the UCI version of \fIMH\fP.
- + .PP
- + Of course,
- + a large number of people have helped \fIMH\fP along.
- + The list of \*(lq\fIMH\fP immortals\*(rq is too long to list here.
- + For this release, numerous \fIMH\-Workers\fP sent in fixes and other
- + changes. A handful of courageous \fIMH\-Workers\fP volunteered
- + to beta-test these changes; their help is particularly appreciated.
- + .KS
- + .SH
- + DISCLAIMER
- + .LP
- + The Regents of the University of California wish to make it known that:
- + .QP
- + Although each program has been tested by its contributor,
- + no warranty, express or implied,
- + is made by the contributor or the University of California,
- + as to the accuracy and functioning of the program
- + and related program material,
- + nor shall the fact of distribution constitute any such warranty,
- + and no responsibility is assumed by the contributor
- + or the University of California in connection herewith.
- + .KE
- + .KS
- + .SH
- + CONVENTIONS
- + .LP
- + In this document,
- + certain formatting conventions are adhered to:
- + .IP
- + The names of
- + \s-2UNIX\s+2
- + commands, such as \fIcomp\fP
- + are presented in \fIitalics\fP.
- + .IP
- + Arguments to programs, such as `msgs' and `\-nobell' are
- + delimited by single-quotes.
- + .IP
- + Text that should be typed exactly as-is, such as
- + command lines (e.g., \*(lqfolder \-pack\*(rq),
- + are delimited by double-quotes.
- + .IP
- + \s-2UNIX\s+2
- + pathnames and envariables,
- + such as \fB/usr/uci\fP and \fB$SIGNATURE\fP,
- + are presented in \fBbold font\fP.
- + .KE
- + .ds LH Changes for MH 6.8
- + .bp
- + .SH
- + CHANGES FOR MH 6.8
- + .LP
- + This is the current released version of \fIMH\fP
- + as of December 14, 1992. This release includes a number
- + of bug fixes and internal changes to make the code more
- + portable.
- + Two new authentication methods are provided for the POP,
- + and support for SVR4 shared libraries is complete.
- + .PP
- + The major user-visible change in this release is the incorporation
- + of support for multi-media mail as specified by the
- + Multi-purpose Internet Mail Extensions (\fBMIME\fP)
- + RFC\ 1341.
- + This allows you to include things like audio,
- + graphics, and the like, in your mail messages.
- + A new command, \fImhn\fP,
- + has been provided to support \fBMIME\fP and
- + a detailed man page is provided in \fImhn\fP\|(1).
- + .SH
- + Documentation
- + .LP
- + The documentation has some general improvements, and
- + the \fBREAD-ME\fP document has been re-organized
- + to help \fIMH\fP administrators find the appropriate
- + configuration options for their system.
- + The \fBMakefile\fPs in the \fBpapers/\fP hierarchy have
- + been changed to invoke \fITeX\fP as
- + \*(lqtex\*(rq (instead of \*(lqtex82\*(rq).
- + .LP
- + The following new man pages are also available:
- + .IP \fImhn\fP\|(1) \w'\fIpopauth\fP\|(8)'u+2n
- + \fImhn\fP helps the user process multi-media mail.
- + .IP \fImhparam\fP\|(1)
- + \fImhparam\fP lets the user extract information from
- + the \fIMH\fP profile.
- + .IP \fIpopauth\fP\|(8)
- + the APOP database administration program (see below).
- + .IP \fIpopi\fP\|(1)
- + the POP initiator (see below).
- + .IP \fIslocal\fP\|(1)
- + fully documents \fIslocal\fP. The \fImhook\fP(1) man page now
- + documents only the \fIMH\fP receive-mail hooks.
- + .SH
- + Internal Changes
- + .LP
- + The \fIMH\fP source code is in the process of being
- + cleaned up to make pedantic ANSI C compilers happy.
- + Occurrences of \*(lqNULL\*(rq have been replaced by
- + \*(lq0\*(rq where appropriate.
- + Extra tokens after \*(lq#else\*(rq and \*(lq#endif\*(rq
- + have been put inside comments (this is still in progress).
- + The code should now compile cleanly on many more systems,
- + specifically, more variants of SVR4.
- + .PP
- + The version of \fBtws/dtimep.c\fP which was included in
- + MH 6.7.2 was incompatible with the \fIlex\fP library
- + on some systems, and has been removed.
- + .PP
- + A bug in the handling of blind lists inside alias
- + files has been fixed.
- + .KS
- + .SH
- + Post Office Protocol
- + .LP
- + There were three new options added to the POP.
- + .IP APOP \w'APOP'u+2n
- + This option indicates that the POP daemon will
- + support the non-standard \fBAPOP\fP command which
- + provides a challenge-based authentication system using
- + the \fBMD5\fP message digest algorithm.
- + .IP
- + This option also causes the
- + \fIpopauth\fP program to be installed, which
- + allows the administrator to manipulate the \fBAPOP\fP
- + authorization database.
- + .KE
- + .IP KPOP
- + Support for KERBEROS with POP.
- + This code builds
- + \fIpopd\fP, \fIinc\fP and \fImsgchk\fP to support only the
- + \*(lqkpop\*(rq protocol.
- + This code is still expiremental, but is available for
- + those sites wishing to test it.
- + .IP MPOP
- + This option indicates that the POP daemon will
- + support the non-standard
- + \fBXTND SCAN\fP command which provides performance
- + enhancements when using the POP over low-speed connections.
- + .IP
- + This option also causes an interactive POP
- + client program, \fIpopi\fP, to be compiled and installed.
- + A man page for the \fIpopi\fP program is also provided.
- + This option requires the configuration to
- + have \*(lqbboards: pop\*(rq.
- + .LP
- + The APOP and MPOP non-standard POP
- + facilities are documented in
- + \fIThe Internet Message\fR (ISBN 0\-13\-092941\-7),
- + a book by Marshall T. Rose.
- + For more details, see \fBsupport/pop/pop-more.txt\fR
- + and the \fIAdministrator's Guide\fP.
- + The APOP option peacefully co-exists with the standard POP,
- + KPOP completely replaces the standard POP, and
- + MPOP requires \*(lqbboards: pop\*(rq.
- + .SH
- + File Locking
- + .LP
- + The file locking code has been cleaned up to support
- + three kinds of kernel-level file locking. As appropriate
- + for your system, include the
- + LOCKF, FCNTL or FLOCK option. For more
- + details, see \fImh-tailor\fP\|(5).
- + .SH
- + .KS
- + Configuration Directives
- + .LP
- + A number of new configuration directives have been added
- + or changed. The full details are given in the \fBREAD-ME\fP.
- + .IP cp: \w'MAILGROUP'u+2n
- + The command used to install new files if not \*(lqcp\*(rq.
- + .IP ln:
- + The command used to link files together in the source tree
- + if not \*(lqln\*(rq.
- + .IP mts:
- + Full support for ZMAILER has been added.
- + .IP popdir:
- + The directory where \fIpopd\fP will be installed if not \fB/usr/etc\fP.
- + .IP regtest:
- + Set to \*(lqon\*(rq to prevent the hostname and compile
- + date from being included in \fIMH\fP binaries.
- + .IP sharedlib:
- + You may now specify \*(lqsun4\*(rq or \*(lqsys5\*(rq
- + (for SVR4) shared libraries.
- + .IP signal:
- + Specifies the base type of the function returned by \fIsignal\fP\|().
- + This was previously defined with \*(lqoptions TYPESIG\*(rq.
- + .KE
- + .LP
- + Several `-D' options to \fIcc\fP have been added or changed:
- + .IP APOP \w'MAILGROUP'u+2n
- + Authenticated POP (see above).
- + .IP AUX
- + Support for A/UX systems.
- + .IP DBMPWD
- + The DBM option has been renamed DBMPWD.
- + .IP HESIOD
- + Support for the HESIOD name server.
- + .IP KPOP
- + KERBEROS POP (see above).
- + .IP LOCALE
- + Support for local characters sets; uses the \fIsetlocal\fP\|() function.
- + .IP MAILGROUP
- + Makes \fIinc\fP set-group-id.
- + You may need this option if your \fB/usr/spool/mail\fP
- + is not world-writeable.
- + .IP MIME
- + Multi-media mail.
- + .IP MPOP
- + Mobile POP (see above).
- + .IP MSGID
- + Enables \fIslocal\fP to detect and surpress duplicate messages.
- + .IP OSF1
- + Support for DEC OSF1 systems. May be incomplete.
- + .IP RENAME
- + Include this option if your system has a \fIrename\fP\|()
- + system call.
- + .IP SVR4
- + Support for System 5 Release 4 or newer systems.
- + .IP TYPESIG
- + This option has been dropped. See `signal' above.
- + .IP UNISTD
- + Include this option if your system has the include
- + file \fB<unistd.h>\fP.
- + .IP VSPRINTF
- + Include this option if your system has the \fIvsprintf\fP\|()
- + library routine; otherwise, \fI\(rudoprnt\fP\|() will be used.
- + .IP YEARMOD
- + Forces the \fImh-format\fP `year' function to
- + return 2-digit values.
- + Use this option during a brief transition period if
- + you have local \fImh-format\fP files which need to
- + be converted to support 4-digit years.
- + .SH
- + FUNCTIONAL CHANGES
- + .LP
- + In addition to the configuration changes mentioned above,
- + a number of functional changes have been made to the system.
- + Many programs have new features added and a few new
- + programs have are provided.
- + Each command's manual page gives
- + complete information about the its operation.
- + Here is a short summary of the changes.
- + .SH
- + MH Sequences
- + .LP
- + A larger number of user-defined sequences are available.
- + Previously, this number had been 10.
- + On 32-bit systems, 26 user-defined sequences are available.
- + .SH
- + Profile Components
- + .LP
- + \fIMH\fP programs will now complain if the
- + \fB\&.mh\(ruprofile\fR does not end in a newline.
- + Also, one enhancement and one new profile component are provided:
- + .IP Aliasfile: \w'AliasfileX'u+2n
- + Multiple filenames may now be given.
- + .IP Inbox:
- + New; the default folder (for \fIinc\fP, etc.) if not \*(lqinbox\*(rq.
- + .KS
- + .SH
- + Format Strings
- + .LP
- + A few minor bugs were fixed in format string handling,
- + and a few new features were added. See \fImh-format\fP\|(5)
- + for complete details.
- + .IP Addresses \w'Xxyearxdatexx'u+2n
- + An attempt is made to decipher X\&.400 RFC\ 987-style addresses.
- + .IP Comments
- + Comments may be added to \fImh-format\fP files; a comment
- + begins with the 2-character sequence \*(lq%;\*(rq,
- + and ends with an un-escaped newline.
- + .IP "%(modulo n)"
- + The `modulo' function escape has been added.
- + .IP %(year{date})
- + The date parser has been enhanced to understand more
- + illegal date formats; `year' now returns a 4-digit number.
- + .KE
- + .SH
- + User Interface Programs
- + .LP
- + A number of \fIMH\fP commands have minor changes:
- + .IP ali \w'packmbox'u+2n
- + The output with `\-user\0\-list' was
- + changed to match the output with `\-nouser\0\-list'.
- + .IP burst
- + Will no longer drop the last message of a digest.
- + .IP inc
- + Accepts the `\-apop' switch for authenticated POP (see above);
- + will attempt to detect write
- + errors (e.g., no space left on device) when incorporating mail;
- + no longer replaces newline characters with NULLs.
- + .IP folder
- + The `\-noprint' option was broken and has been dropped.
- + .IP forw
- + Supports `\-mime' to use MIME-style multi-part messages.
- + .IP mhl
- + Will no longer put an extra space at the end of the
- + `%{text}' in a formatfield.
- + .IP mhn
- + New; manipulates multi-media (MIME) messages; a detailed
- + man page is provided.
- + .IP mhparam
- + New; reads the \fIMH\fP profile (and context)
- + and writes the values of the specified components on the
- + standard output; useful in programmatic constructs.
- + .IP msgchk
- + Supports `\-apop' (see above).
- + .IP packmbox
- + New; packs an \fIMH\fP folder into a UUCP-style mailbox.
- + .IP popi
- + New; a client-side POP initiator; available only if you
- + built \fIMH\fP with the MPOP option (see above).
- + .IP refile
- + A bug where the `rmmproc' did not remove all specified
- + message files has been fixed.
- + .IP scan
- + The `\-file' option is fully supported and will no longer
- + complain about empty folders.
- + .IP send
- + Supports `\-mime' and `\-split' to split large messages
- + into multiple partial messages using MIME.
- + .SH
- + Support Programs
- + .IP fmtdump \w'packmbox'u+2n
- + Can now read a format file, or a format string given
- + on the command line.
- + .IP popauth
- + New; manages the APOP authorization database (see above).
- + .IP sendmail
- + The \fIsendmail\fP replacement will be installed
- + only if your `mts' setting uses the `/smtp' option.
- + .IP slocal
- + A new man page for \fIslocal\fP is available;
- + the new `mbox' action is available to write a file
- + in \fIpackf\fP format;
- + a bug where extra `>' characters were written to MMDF-style
- + maildrops has been fixed;
- + if compiled with the MSGID option, can detect and suppress
- + reception of duplicate messages.
- + .IP viamail
- + New; bundles a directory (like \fIshar\fP\|) and
- + sends it through multi-media mail.
- +
- + .ds LH Changes for MH 6.7.2
- + .bp
- + .ds CF Feb 1, 1992
- + .SH
- + CHANGES FOR MH 6.7.2
- + .LP
- + The MH.6.7.2 patch release is a maintenance
- + release.
- + This is the
- + current released version of \fIMH\fP as of February 1, 1992.
- + .PP
- + This release now supports the NCR Tower running SYS5R4.
- + The WP changes installed in MH.6.7.0 have been removed.
- + .SH
- + Shared Libraries
- + .LP
- + Support for SYS 5 shared libraries is in progress.
- + .PP
- + Support for Sun OS 4.0 shared libraries had been improved.
- + The \fIMH\fP library has been modified to move initialized
- + data into a data definition file. The shared library will
- + now consist of a \fBlibmh.so\fP and \fBlibmh.sa\fP file.
- + The shared library version number will no longer track the
- + \fIMH\fP patch release number, and its numbering begins with
- + version `1.1' with this release.
- + .SH
- + Replacement SendMail
- + .LP
- + Since many standard system programs expect to post mail by
- + invoking \fB/usr/lib/sendmail\fP,
- + a minimal replacement \fISendMail\fP is provided in
- + this release. This replacement is meant to be installed
- + on (e.g., diskless) client workstations which post mail
- + using SMTP, and do not run a message transport system.
- + It will call \fIpost\fP to post mail; be sure you have
- + configured \fIMH\fP with the `/smtp' mts option.
- + This sendmail replacement is installed in your
- + \fIMH\fP etc directory, and you should link
- + \fB/usr/lib/sendmail\fP
- + to it.
- + .KS
- + .SH
- + Format Strings
- + .LP
- + A manual page for the \fIfmtdump\fP format string disassembler
- + is supplied, and some new format functions were added:
- + .IP folder \w'%getenv'u+2n
- + In \fIscan\fP, this component escape
- + contains the name of the current folder.
- + It is not defined for other \fIMH\fP commands.
- + .IP getenv
- + This function escape returns the value of an environment variable.
- + .KE
- + .PP
- + There will be some additional changes in these routines in the
- + next patch release.
- + .KS
- + .SH
- + Other Bug Fixes and Enhancements
- + .LP
- + In addition to some other minor enhancements,
- + some bugs were fixed which in general were not user\-visible:
- + .IP "Blind lists" \w'datexparsing'u+2n
- + Users may now specify RFC822 address groups in their
- + alias files. These groups are implemented by \fIMH\fP
- + as blind lists.
- + .IP "date parsing"
- + A number of sites have brain-damaged versions of \fBlex\fP.
- + \fIMH\fP will now come with the date parser already run
- + through lex.
- + .IP mark
- + A bug dealing with \fImark\fP and the sequence named `cur'
- + is fixed. This was previously a problem for mh-e users.
- + .IP MH.doc
- + The \fIMH\fP nroff version of the manual no longer contains
- + teletype escape sequences.
- + .IP scan
- + Can now handle headers as long as 512 bytes.
- + .IP Signals
- + \fIMH\fP programs will no longer catch the \fBHUP\fP
- + and \fBTERM\fP signals while waiting for a sub-process.
- + This was causing hung processes when your terminal line was
- + was dropped unexpectedly.
- + .IP Signature
- + If your signature is not defined, \fIMH\fP will
- + use the value of the gecos field of your \fB/etc/passwd\fP
- + entry as your signature.
- + .IP "version.sh"
- + A bug in the \fBawk\fP script in \fBconfig/version.sh\fP
- + was fixed.
- + .KE
- + .ds LH Changes for MH 6.7.1a
- + .bp
- + .ds CF January 25, 1991
- + .SH
- + CHANGES FOR MH 6.7.1a
- + .LP
- + The MH.6.7.1a patch was made available
- + on January 25, 1991 for limited distribution only.
- + (This release had some known bugs, and so was
- + not widely distributed.)
- + This release incorporates several new features
- + of particular note to users of sequences and format strings,
- + as well as some general documentation improvements.
- + There are a few minor enhancements and internal bug fixes also.
- + Complete documentation of these changes is given in
- + the individual manual pages, and the \fBREAD-ME\fP file.
- + .SH
- + Message Sequences
- + .LP
- + A new manual page, \fImh\-sequence\0\fP(5), has been added.
- + This manual page attempts to completely document the
- + syntax and semantics of \fIMH\fP message sequence specifications.
- + .PP
- + A powerful new feature is the ability to specify message
- + ranges with user-defined sequences. The specification
- + \*(lqname:n\*(rq may be used, and it designates up to the
- + first `n' messages (or last `n' messages for `-n')
- + which are elements of the user-defined sequence `name'.
- + .PP
- + The message
- + specifications \*(lqname:next\*(rq and \*(lqname:prev\*(rq
- + may also be used, and they
- + designate the
- + next or previous message (relative to the current message)
- + which is an element of the user-defined sequence `name'.
- + The specifications
- + \*(lqname:first\*(rq and \*(lqname:last\*(rq are equivalent
- + to \*(lqname:1\*(rq and \*(lqname:\-1\*(rq, respectively.
- + The specification \*(lqname:cur\*(rq is not allowed
- + (use just \*(lqcur\*(rq instead).
- + .PP
- + These specifications allow the user to step through
- + a sequence with a command like \*(lqshow name:next\*(rq.
- + .SH
- + Format Strings
- + .LP
- + \fIMH\fP format strings now support an if-then-elseif-else
- + clause (the `elseif' is new). This will make
- + format strings with multi-case conditions somewhat less complex.
- + .PP
- + A new format function `addr' had been added. This function
- + takes an address header name as its argument, and returns
- + a rendering of the address contained in that header
- + as \*(lquser@host\*(rq or \*(lqhost!user\*(rq.
- + .PP
- + Format widths now may be specified as a negative number.
- + This causes the output to be right-justified
- + within the format width.
- + .KS
- + .SH
- + Other Changes
- + .LP
- + Along with a few minor enhancements,
- + some bugs were fixed which in general were not user-visible:
- + .IP "fmtdump" \w'whatnow'u+2n
- + This new program
- + produces an pseudo-language
- + representation of an \fIMH\fP format file, vaguely
- + reminiscent of assembly language. While this output format
- + is not explicitly documented,
- + it can still be useful when debugging \fIMH\fP format files.
- + .IP "refile"
- + Now takes a `\-\[no\]rmmproc' switch. This makes it
- + easier to avoid loops when your \*(lqrmmproc\*(rq calls \fIrefile\fP.
- + .IP "slocal"
- + A problem with the UUCP-style mailboxes,
- + the `RPATHS' configuration option,
- + and the \*(lqReturn-Path:\*(rq header was fixed.
- + .IP "sortm"
- + Will ensure that no messages are lost if it is interrupted.
- + .IP "whatnow"
- + Will now tell you where it is leaving the draft, when
- + interrupted in the initial edit. Previously the draft
- + was simply unlinked.
- + .KE
- + .KS
- + .SH
- + Compilation Options
- + .IP "LOCKF" \w'whatnow'u+2n
- + This option causes \fIMH\fP to use the \fBlockf()\fP
- + system call for locking (if available),
- + instead of \fBflock()\fP.
- + .KE
- + .ds LH Changes for MH 6.7.1
- + .bp
- + .ds CF December 14, 1990
- + .SH
- + CHANGES FOR MH 6.7.1
- + .LP
- + The MH.6.7.1 patch release is a maintenance
- + release, and as such, provides few changes from
- + the previous release. This is the
- + current released version of \fIMH\fP as of December 14, 1990.
- + .SH
- + User-Visible Changes
- + .LP
- + The major change in this release is to the
- + POP daemon (popd). In \fIMH\fP 6.7,
- + it was changed to be able to read both UUCP and
- + MMDF-style mailboxes. This did not work as reported. The
- + code has now been changed to parse MMDF-style mailboxes if
- + you are configuring MH to run with MMDF as your message
- + transport system. Otherwise, UUCP-style mailboxes are
- + expected.
- + .PP
- + Since there are number of client programs available for
- + only the POP2 protocol instead of POP3, popd has been
- + updated to support both protocols. This is a major
- + win. If you are compiling
- + with POP turned on, add the `POP2' option to
- + your \fIMH\fP config file, and the POP daemon
- + will respond to POP2 or POP3 commands. If you're using
- + POP, there's no reason not to include this option; it does
- + not affect the existing support for POP3.
- + .KS
- + .SH
- + Internal Changes
- + .LP
- + Some bugs were fixed which in general were not user-visible:
- + .IP "context" \w'replnnetcn'u+2n
- + Errors when writing out sequences are detected correctly.
- + .IP "inc"
- + No longer inserts extra blank lines into messages.
- + .IP "mh-format"
- + A nil pointer bug in the address parser was fixed.
- + .IP "repl, etc."
- + The malloc/free problem has been fixed.
- + .IP "rmf"
- + A spelling error in the `\-nointeractive' switch has been corrected.
- + .IP "rcvtty"
- + Will not print the message size if not available (i.e., zero).
- + .IP "send/post"
- + Illegal signatures (those containing unquoted "."s) will be quoted.
- + .KE
- + .ds LH Changes for MH 6.7.0
- + .bp
- + .ds CF April 12, 1990
- + .SH
- + GENERAL CHANGES FOR MH 6.7.0
- + .LP
- + The author is pleased to announce that there are very few
- + user\-visible
- + changes to \fIMH\fP 6.7 from the previous \fIMH\fP 6.6 distribution.
- + The majority of development was in the form of bug fixes and
- + slight enhancements.
- + In addition, this release is slightly faster than the
- + previous release.
- + With a few minor exceptions,
- + it is backward\-compatible with the previous release.
- + \fIMH\fP 6.7.0 is the current released version of \fIMH\fP
- + as of April 12, 1990.
- + .PP
- + The changes were made mainly to generalize the source code to
- + be compatible with a larger range of systems and compilers.
- + There were many small changes to add declarations for ANSI C compliance.
- + The System 5 support has been brought up to SYS5 R3, and there is
- + support for Sun OS 4.0.
- + .SH
- + User\-Visible Changes
- + .LP
- + Here a quick summary of the
- + changes that were made which are not backward\-compatible with the
- + previous release of \fIMH\fP:
- + .IP repl \w'sortm'u+2n
- + The `\-format' and `\-noformat' switches
- + have not been functional since \fIMH\fP 5, and have been removed.
- + Any users who have these switches in their \fB\&.mh\(ruprofile\fP,
- + will have to remove them.
- + .IP sortm
- + Previously, in most cases \fIsortm\fP would fill\-in any
- + gaps in the numbering of a folder,
- + by renumbering the messages starting with `1'.
- + This will no longer occur; for this behavior,
- + use \*(lqfolder \-pack\*(rq.
- + .PP
- + .SH
- + Using Aliases
- + .LP
- + A new profile entry `Aliasfile:' has been added. The
- + \fIali\fP\^, \fIsend\fP\^, and \fIwhom\fP programs will look for
- + this profile entry and treat it as they would an argument to
- + `\-alias'.
- + This should make it easier for novice \fIMH\fP users to begin
- + using aliases.
- + .PP
- + .SH
- + Reading Network News & BBoards
- + .LP
- + The UCI BBoards facility can read local BBoards, and if compiled
- + with the `bboards: pop' and `pop: on' options, can also read remote
- + BBoards using the Post Office Protocol (POP ver. 3).
- + With this release,
- + \fIMH\fP can instead be compiled to read the Network News
- + (i.e., USENET) using the Network News Transfer Protocol (NNTP).
- + .PP
- + This capability is enabled by compiling \fIMH\fP with
- + the `bboards: nntp' and `pop: on' options.
- + Unfortunately, reading remote BBoards via the POP and reading the Network
- + News via the NNTP are mutually exclusive options.
- + .PP
- + To support the NNTP,
- + a new module, \fBuip/pshsbr.c\fP, is compiled and loaded into
- + \fIbbc\fP and \fImsh\fP instead of \fBuip/popsbr.c\fP.
- + The default BBoard is changed from \*(lqsystem\*(rq to \*(lqgeneral\*(rq
- + for the NNTP.
- + .PP
- + When reading BBoards,
- + \fIbbc\fP will first look for local BBoards, and then contact the
- + NNTP server to read the Network News. The location of the
- + NNTP server should be specified with the `nntphost:'
- + entry in the \fBmtstailor\fP file
- + (see the \fIMH\fP Administrator's Guide for details),
- + or may be specified on
- + the command line with the `\-host' switch.
- + .PP
- + .SH
- + Format Strings
- + .LP
- + The manual page \fImh\-format\fP\0(5) has
- + been rewritten to give a better explanation of how to write format strings,
- + and how they are interpreted by \fIMH\fP.
- + A line\-by\-line
- + description of the
- + default \fIrepl\fP form file (\fBreplcomps\fP)
- + is now included in that manual page.
- + .PP
- + .KS
- + Some new format functions were added, and others were augmented:
- + .IP trim \w'date2local'u+2n
- + Strips any leading and trailing white\-space from the current string value.
- + .IP date2local
- + Will coerce the date to the local timezone.
- + .IP date2gmt
- + Will coerce the date to GMT.
- + .IP divide
- + Divides the current numeric value by its argument.
- + This could be useful for
- + building \fIscan\fP format strings which print large
- + message sizes in \*(lqKb\*(rq or \*(lqMb\*(rq.
- + .IP friendly
- + If the address field cannot be parsed,
- + this function will return the text of the address header,
- + instead of a null string.
- + .IP szone
- + A flag indicating whether the timezone was explicit
- + in the date string.
- + .KE
- + .SH
- + PROGRAM CHANGES
- + .LP
- + In addition to the general changes mentioned above,
- + many programs have specific new features added,
- + either by new switches or by expanded functionality.
- + Each command's manual page gives complete information about
- + its new options. Here is a short summary.
- + .SH
- + User Interface Programs
- + .IP anno \w'prompter'u+2n
- + Accepts a `\-nodate' switch which inhibits the date annotation,
- + leaving only the body annotation.
- + .IP folder
- + When invoked with the `\-pack' switch
- + and the new `\-verbose' switch, \fIfolder\fP will
- + give information about the actions taken to renumber the folder.
- + .IP
- + On most systems, \fIfolder\fP can now create any non\-existing
- + parent folders of a new sub\-folder.
- + .IP forw
- + When making digests, \fIforw\fP\^
- + will put the issue and volume numbers
- + in addition to the digest list name, in the digest trailer.
- + .IP inc
- + Detects NFS write failures, and will
- + not zero your maildrop in that event.
- + .IP msh
- + Supports a variant of the new \fIsortm\fP\^.
- + .IP prompter
- + Considers a period on a line by itself to signify end\-of\-file
- + when the `\-doteof' switch is specified.
- + .IP repl
- + The `\-[no]format' switches
- + have not been used since \fIMH\fP 5 and have been deleted. \fIrepl\fP
- + will now find filter files in the \fIMH\fP library area.
- + .IP scan
- + With the `\-file msgbox' switch, \fIscan\fP\^
- + can list a \fIpackf\fP\|'d\-format file directly
- + (without using \fImsh\fP\^).
- + .IP
- + Lists messages in reverse order with the `\-reverse' switch.
- + This should be considered a bug.
- + .IP sortm
- + Now has the options:
- + `\-textfield field', `\-notextfield',
- + `\-limit days', and `\-nolimit'.
- + .IP
- + With these options, \fIsortm\fP can be instructed to sort a
- + folder based on the contents of an arbitrary header such
- + as \*(lqsubject\*(rq.
- + .IP
- + \fIsortm\fP minimizes renaming messages, and
- + will no longer arbitrarily pack folders; for this behavior,
- + use \*(lqfolder \-pack\*(rq.
- + .IP whatnow
- + Deletes the draft by renaming it with leading comma, instead
- + of unlinking it.
- + .SH
- + \fIMH\fP Support Programs
- + .LP
- + .KS
- + The following support programs also have changes or enhancements:
- + .IP mhl \w'rcvtty'u+2n
- + Will now accept a format string on any component, not just on
- + addresses and dates.
- + .KE
- + .IP popd
- + Will use \fIshadow\fP passwords if compiled with the
- + \fBSHADOW\fP option. It can now also
- + read UUCP\-style maildrops directly.
- + .IP rcvtty
- + If given no arguments, \fIrcvtty\fP will produce a \fBscan\fP
- + listing as specified by a format string or file; a default
- + format string is used if one is not specified.
- + .IP
- + Before the listing is written to the users terminal, the
- + terminal's bell is rung and a newline is output.
- + The `\-nobell' and the `\-nonewline' options
- + inhibit these functions.
- + .IP
- + \fIrcvtty\fP will obey terminal write
- + notification set by \fImesg\fP.
- + With the `\-biff' switch, \fIrcvtty\fP will
- + also obey the mail notification status set by
- + \fIbiff\fP.
- + .IP
- + On \fBBSD43\fP systems, as with \fIwrite\fP,
- + \fIrcvtty\fP will be installed set\-group\-id to the group \*(lqtty\*(rq.
- + .IP slocal
- + Understands UUCP\-style \*(lqFrom \*(rq lines and will write
- + output files using this format if appropriate.
- + Before invoking a delivery program, \fIslocal\fP will strip
- + such lines unless compiled with the \fBRPATHS\fP option,
- + in which case it will will convert such lines into
- + \*(lqReturn\-Path:\*(rq headers.
- + .IP
- + \fIslocal\fP has a new result code \*(lqN\*(rq,
- + for use in \fB.maildelivery\fP files.
- + With this result code,
- + \fIslocal\fP will
- + perform the action only if the message has not been delivered
- + and the previous action succeeded. This allows for performing
- + an action only if multiple conditions are true.
- + .SH
- + DOCUMENTATION
- + .LP
- + Several of the older \fIMH\fP papers have been difficult to format
- + because they depended on an older version of
- + PhDTeX which was
- + not supplied. These papers have been updated, and some TeX
- + library files are supplied in \fBpapers/doclib/\fP, so that
- + these papers may be generated on any system with TeX.
- + .PP
- + Many of the manual pages have been revised to include documentation
- + of new command options, and some have been expanded to give more detail.
- + All are now slightly reformatted at installation time
- + to make them more compatible with programs like \fImakewhatis\fP\^.
- + .PP
- + .SH
- + \fIMH\fP ADMINISTRATION
- + .LP
- + This section describes changes in configuring, compiling and
- + installing \fIMH\fP 6.7 and should not
- + be of interest to casual \fIMH\fP users.
- + The \fBREAD\-ME\fP file has been
- + considerably revised and expanded to give more detail
- + about the configuration and compilation options which
- + have been included in this release. Some compilation options
- + have been removed, and many new options have been added.
- + .PP
- + All \fIMH\fP \fBMakefile\fPs have been updated to work around some
- + incompatibilities introduced in newer versions of \fImake\fP\^.
- + \fIMH\fP programs will no longer be installed with the sticky\-bit
- + turned on.
- + .PP
- + Reading this section not a substitute for carefully
- + reading the \fBREAD\-ME\fP file before attempting to compile \fIMH\fP
- + .PP
- + .KS
- + .SH
- + Bug Fixes
- + .LP
- + Some bugs were fixed which in general were not user\-visible:
- + .IP "address parser" \w'dynamicnmemory'u+2n
- + Fixed to allow use of the \*(lqAT\*(rq domain, and some
- + minor bugs were fixed pertaining to address groups.
- + .IP "date parser"
- + Improved to accept more forms of illegal dates. Military
- + timezones were removed.
- + .IP "dynamic memory"
- + Many problems with corruption of the dynamic memory pool
- + have been fixed.
- + .IP locking
- + Will open files for write, if necessary to enable locking.
- + .IP "nil pointers"
- + All reported nil pointer problems have been fixed.
- + .IP replcomps
- + The \*(lqIn\-Reply\-To:\*(rq header had quotes added
- + around the date field to comply with RFC822.
- + .KE
- + .SH
- + White Pages
- + .LP
- + If \fIMH\fP is compiled with the \fBWP\fP option,
- + \fIsend\fP recognizes an address between \*(lq<<\*(rq and \*(lq>>\*(rq characters
- + such as:
- + .DS
- + To: << rose \-org psi >>
- + .DE
- + to be a name meaningful to a whitepages service. In order to expand the
- + name, \fIsend\fP must be invoked interactively
- + (i.e., not from \fIpush\fP\^). For each
- + name, \fIsend\fP will invoke a command called \fIfred\fP\^
- + in a special mode asking to expand the name.
- + .PP
- + To get a copy of the white pages service, contact wpp\-manager@psi.com.
- + .SH
- + Configuration Options
- + .LP
- + Some configuration options have been added or changed:
- + .IP cc \w'bbdelivery'u+2n
- + To specify an alternate C compiler.
- + .IP ccoptions
- + Defaults to `\-O'.
- + .IP bboards
- + May now be defined as \*(lqon\*(rq,
- + \*(lqoff\*(rq, \*(lqpop\*(rq, or \*(lqnntp\*(rq.
- + .IP bbdelivery
- + Determines whether the bboard delivery agent
- + and library files should be installed.
- + .IP lex
- + To specify an alternate version of \fIlex\fP\^.
- + .IP mailgroup
- + If defined, \fIinc\fP will be made set\-group\-id to this group.
- + .IP sharedlib
- + For \fBSUN40\fP systems; if \*(lqon\*(rq, makes \fBlibmh.a\fP
- + into a shared library.
- + .IP slibdir
- + The directory where the above shared library should be installed.
- + .IP sprintf
- + Set this to \*(lqint\*(rq if that's what your \fIsprintf\fP\0(3) library
- + routine returns.
- + .SH
- + Compilation Options
- + .LP
- + For different configurations,
- + several `\-D' options to \fIcc\fP have been added or changed:
- + .IP BERK \w'SENDMAILBUG'u+1n
- + This disables the address and date parsing routines. If you
- + want to do much with \fImh\-format\fP\0(5), don't enable this.
- + .IP BSD43
- + Will make \fIrcvtty\fP set\-group\-id to the group \*(lqtty\*(rq.
- + .IP DBM
- + For sites with a dbm\-style password file (such as with Yellow
- + Pages), \fIMH\fP will not read the entire passwd file into a cache.
- + At one site that runs YP on a large passwd file, using this
- + showed a 6:1 performance improvement.
- + .IP NETWORK
- + This option has been deleted. See \fBSOCKETS\fP.
- + .IP NOIOCTLH
- + Tells \fIMH\fP not to include the file \fBsys/ioctl.h\fP. Use this
- + if this file is not present on your system.
- + .IP NTOHLSWAP
- + On systems with TCP/IP networking,
- + \fImsh\fP will try to use the \fBntohl()\fP macro from the
- + file \fBnetinet/in.h\fP to byte\-swap the binary map files
- + it writes.
- + .IP SENDMAILBUG
- + Some versions of \fIsendmail\fP return a \fB451\fP (failure) reply code
- + when they don't mean to indicate failure. This option considers
- + that code to be equivalent to \fB250\fP (OK).
- + .IP SHADOW
- + Causes \fIpopd\fP to read the file \fB/etc/shadow\fP for
- + encrypted passwords instead of \fB/etc/passwd\fP. Use this if you
- + have a shadow password file (such as on newer versions of SYSTEM 5).
- + .IP SOCKETS
- + Enable this if you are on a non\-BSD system with a
- + socket interface for TCP/IP networking compatible with 4.2BSD
- + .SM
- + UNIX.
- + .NL
- + .IP SUN40
- + Use on Suns running Sun OS 4.0 and later.
- + .IP SYS5
- + This option has been updated to refer to SYS5 R3 and later systems.
- + .IP SYS5DIR
- + Use this if your system uses \*(lqstruct dirent\*(rq instead of
- + \*(lqstruct direct\*(rq. This should be true for systems based
- + on SYS5 R3 and later.
- + .IP TYPESIG
- + Defines the base type for the \fIsignal\fP system call. This
- + defaults to \*(lqint\*(rq, but should be defined as \*(lqvoid\*(rq
- + if appropriate for your system.
- + .IP WP
- + Enables support for the White Pages service.
- + .SH
- + Installation
- + .LP
- + \fIMH\fP will now
- + explicitly set the protection mode on every file it installs.
- + .PP
- + Previously any existing file installed by \fIMH\fP
- + would be backed up into
- + the source tree, and then overwritten.
- + Now, a few system\-dependent files will not be overwritten, and your
- + changes will have to be merged in by hand.
- + See the \fBREAD\-ME\fP file for more details.
- *** ../mh-6.7.2/papers/doclib/READ-ME Tue Mar 6 14:50:39 1990
- --- papers/doclib/READ-ME Thu Feb 13 10:26:09 1992
- ***************
- *** 1,2 ****
- ! [ doclib/READ-ME - 31Jan90/JLR ]
-
- --- 1,2 ----
- ! @(#)$Id: READ-ME,v 1.2 1992/02/13 18:26:08 jromine Exp $
-
- ***************
- *** 22,25 ****
- For this reason, this directory contains all files necessary to typeset
- ! these documents using plain TeX (as of Version 2.991). The Makefiles
- ! call TeX as "tex82".
-
- --- 22,24 ----
- For this reason, this directory contains all files necessary to typeset
- ! these documents using plain TeX (as of Version 2.991).
-
- *** ../mh-6.7.2/papers/doclib/diss.sty Thu Apr 5 16:05:45 1990
- --- papers/doclib/diss.sty Thu Feb 13 10:27:38 1992
- ***************
- *** 1,3 ****
- % UCI Dissertation Style for AmSTeX.
- ! % @(#)$Id: diss.sty,v 1.3 90/04/05 15:20:23 sources Exp $
-
- --- 1,3 ----
- % UCI Dissertation Style for AmSTeX.
- ! % @(#)$Id: diss.sty,v 1.3 1990/04/05 15:20:23 sources Exp $
-
- *** ../mh-6.7.2/papers/mh4/Makefile Tue Mar 6 14:49:44 1990
- --- papers/mh4/Makefile Thu Feb 13 10:23:51 1992
- ***************
- *** 10,12 ****
-
- ! .tex.dvi:; sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex82 \
- \\nonstopmode\\input $<\\bye; \
- --- 10,12 ----
-
- ! .tex.dvi:; sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex \
- \\nonstopmode\\input $<\\bye; \
- *** ../mh-6.7.2/papers/mh5/Makefile Tue Mar 6 14:49:45 1990
- --- papers/mh5/Makefile Thu Feb 13 10:23:54 1992
- ***************
- *** 10,12 ****
-
- ! .tex.dvi:; sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex82 \
- \\nonstopmode\\input $<\\bye; \
- --- 10,12 ----
-
- ! .tex.dvi:; sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex \
- \\nonstopmode\\input $<\\bye; \
- *** ../mh-6.7.2/papers/multifarious/Makefile Tue Mar 6 14:49:46 1990
- --- papers/multifarious/Makefile Thu Feb 13 10:23:57 1992
- ***************
- *** 10,12 ****
-
- ! .tex.dvi:; sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex82 \
- \\nonstopmode\\input $<\\bye; \
- --- 10,12 ----
-
- ! .tex.dvi:; sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex \
- \\nonstopmode\\input $<\\bye; \
- *** ../mh-6.7.2/papers/realwork/Makefile Tue Mar 6 14:49:46 1990
- --- papers/realwork/Makefile Thu Feb 13 10:24:01 1992
- ***************
- *** 10,12 ****
-
- ! .tex.dvi:; sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex82 \
- \\nonstopmode\\input $<\\bye; \
- --- 10,12 ----
-
- ! .tex.dvi:; sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex \
- \\nonstopmode\\input $<\\bye; \
- *** ../mh-6.7.2/papers/trusted/Makefile Tue Mar 6 14:49:47 1990
- --- papers/trusted/Makefile Thu Feb 13 10:24:03 1992
- ***************
- *** 10,12 ****
-
- ! .tex.dvi:; sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex82 \
- \\nonstopmode\\input $<\\bye; \
- --- 10,12 ----
-
- ! .tex.dvi:; sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex \
- \\nonstopmode\\input $<\\bye; \
- *** ../mh-6.7.2/papers/tutorial/Makefile Tue Mar 6 14:49:47 1990
- --- papers/tutorial/Makefile Thu Feb 13 10:24:06 1992
- ***************
- *** 10,12 ****
-
- ! .tex.dvi:; sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex82 \
- \\nonstopmode\\input $<\\bye; \
- --- 10,12 ----
-
- ! .tex.dvi:; sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex \
- \\nonstopmode\\input $<\\bye; \
- *** ../mh-6.7.2/sbr/addrsbr.c Thu Jan 30 14:39:50 1992
- --- sbr/addrsbr.c Mon Oct 26 14:44:34 1992
- ***************
- *** 1,7 ****
- /* addrsbr.c - parse addresses 822-style */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: addrsbr.c,v 1.10 1992/01/30 22:39:48 jromine Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include "../h/addrsbr.h"
- --- 1,7 ----
- /* addrsbr.c - parse addresses 822-style */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: addrsbr.c,v 1.13 1992/10/26 22:44:26 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include "../h/addrsbr.h"
- ***************
- *** 9,15 ****
- #include <stdio.h>
- #ifdef BERK
- #include <ctype.h>
- ! #endif BERK
-
- /* High level parsing of addresses:
-
- --- 9,15 ----
- #include <stdio.h>
- #ifdef BERK
- #include <ctype.h>
- ! #endif /* BERK */
-
- /* High level parsing of addresses:
-
- ***************
- *** 84,95 ****
- #if !defined(DUMB) && defined(SENDMTS) && !defined(BANG)
- #define MF
- #define UucpChan() "UUCP"
- ! #endif MF
-
- #ifdef BERK
- static char *err = NULL;
- static char adrtext[BUFSIZ];
- ! #else not BERK
- static int ingrp = 0;
-
- static char *pers = NULL;
- --- 84,95 ----
- #if !defined(DUMB) && defined(SENDMTS) && !defined(BANG)
- #define MF
- #define UucpChan() "UUCP"
- ! #endif /* MF */
-
- #ifdef BERK
- static char *err = NULL;
- static char adrtext[BUFSIZ];
- ! #else /* not BERK */
- static int ingrp = 0;
-
- static char *pers = NULL;
- ***************
- *** 100,106 ****
- static char *note = NULL;
-
- static char err[BUFSIZ];
- ! #endif not BERK
- static char adr[BUFSIZ];
-
-
- --- 100,106 ----
- static char *note = NULL;
-
- static char err[BUFSIZ];
- ! #endif /* not BERK */
- static char adr[BUFSIZ];
-
-
- ***************
- *** 182,188 ****
- while (state != EOA) {
- *adrcopy++ = c;
- if (state != COM)
- ! *nxtout++ = isupper (c) ? tolower (c) : c;
- switch (state+c) {
-
- case NORMAL+'\n': /* discard newlines */
- --- 182,188 ----
- while (state != EOA) {
- *adrcopy++ = c;
- if (state != COM)
- ! *nxtout++ = (isalpha(c) && isupper (c)) ? tolower (c) : c;
- switch (state+c) {
-
- case NORMAL+'\n': /* discard newlines */
- ***************
- *** 244,250 ****
- err = "illegal \\";
- }
- *adrcopy++ = c;
- ! *nxtout++ = isupper (c) ? tolower (c) : c;
- break;
-
- case NORMAL+',':
- --- 244,250 ----
- err = "illegal \\";
- }
- *adrcopy++ = c;
- ! *nxtout++ = (isalpha(c) && isupper (c)) ? tolower (c) : c;
- break;
-
- case NORMAL+',':
- ***************
- *** 286,296 ****
- adr_ptr = NULL;
- return NULL;
- }
- ! #else not BERK
- register struct adrx *ap;
-
- pers = mbox = host = route = grp = note = NULL;
- ! err[0] = NULL;
-
- if ((ap = getadrx (addrs ? addrs : "")) == NULL)
- return NULL;
- --- 286,296 ----
- adr_ptr = NULL;
- return NULL;
- }
- ! #else /* not BERK */
- register struct adrx *ap;
-
- pers = mbox = host = route = grp = note = NULL;
- ! err[0] = '\0';
-
- if ((ap = getadrx (addrs ? addrs : "")) == NULL)
- return NULL;
- ***************
- *** 307,313 ****
- (void) strcpy (err, ap -> err);
-
- return adr;
- ! #endif not BERK
- }
-
- /* */
- --- 307,313 ----
- (void) strcpy (err, ap -> err);
-
- return adr;
- ! #endif /* not BERK */
- }
-
- /* */
- ***************
- *** 314,320 ****
-
- #ifdef BERK
- /* ARGSUSED */
- ! #endif BERK
-
- struct mailname *getm (str, dfhost, dftype, wanthost, eresult)
- register char *str,
- --- 314,320 ----
-
- #ifdef BERK
- /* ARGSUSED */
- ! #endif /* BERK */
-
- struct mailname *getm (str, dfhost, dftype, wanthost, eresult)
- register char *str,
- ***************
- *** 327,337 ****
- register char *pp;
- #ifndef DUMB
- register char *dp;
- ! #endif not DUMB
- #ifdef MF
- char *up = UucpChan ();
- ! #endif MF
- ! #endif not BERK
- register struct mailname *mp;
-
- if (err && err[0]) {
- --- 327,337 ----
- register char *pp;
- #ifndef DUMB
- register char *dp;
- ! #endif /* not DUMB */
- #ifdef MF
- char *up = UucpChan ();
- ! #endif /* MF */
- ! #endif /* not BERK */
- register struct mailname *mp;
-
- if (err && err[0]) {
- ***************
- *** 344,354 ****
- }
- #ifdef BERK
- if (str == NULL || *str == '\0') {
- ! #else not BERK
- if (pers == NULL
- && mbox == NULL && host == NULL && route == NULL
- && grp == NULL) {
- ! #endif not BERK
- if (eresult)
- (void) strcpy (eresult, "null address");
- else
- --- 344,354 ----
- }
- #ifdef BERK
- if (str == NULL || *str == '\0') {
- ! #else /* not BERK */
- if (pers == NULL
- && mbox == NULL && host == NULL && route == NULL
- && grp == NULL) {
- ! #endif /* not BERK */
- if (eresult)
- (void) strcpy (eresult, "null address");
- else
- ***************
- *** 370,376 ****
- dfhost = LocalName ();
- dftype = LOCALHOST;
- }
- ! #endif not BERK
-
- mp = (struct mailname *) calloc ((unsigned) 1, sizeof *mp);
- if (mp == NULL) {
- --- 370,376 ----
- dfhost = LocalName ();
- dftype = LOCALHOST;
- }
- ! #endif /* not BERK */
-
- mp = (struct mailname *) calloc ((unsigned) 1, sizeof *mp);
- if (mp == NULL) {
- ***************
- *** 389,395 ****
- mp -> m_mbox = getcpy (adr);
- if (!index (adr, '@') && !index (adr, '!'))
- mp -> m_nohost = 1;
- ! #else not BERK
- if (pers)
- mp -> m_pers = getcpy (pers);
-
- --- 389,395 ----
- mp -> m_mbox = getcpy (adr);
- if (!index (adr, '@') && !index (adr, '!'))
- mp -> m_nohost = 1;
- ! #else /* not BERK */
- if (pers)
- mp -> m_pers = getcpy (pers);
-
- ***************
- *** 414,420 ****
- *pp = NULL;
- goto get_uucp;
- }
- ! #else not MMDFMTS
- if (up && (pp = index (host, '.'))
- && uleq (up, pp + 1)) {/* uucpaddr@host.<uucp> */
- *pp = NULL;
- --- 414,420 ----
- *pp = NULL;
- goto get_uucp;
- }
- ! #else /* not MMDFMTS */
- if (up && (pp = index (host, '.'))
- && uleq (up, pp + 1)) {/* uucpaddr@host.<uucp> */
- *pp = NULL;
- ***************
- *** 423,429 ****
- mp -> m_type = UUCPHOST;
- goto got_host;
- }
- ! #endif not MMDFMTS
- if (up && uleq (dfhost, LocalName ())
- && uleq (up, host)) {/* uucpaddr@<uucp> [local] */
- if (pp = index (mbox, '!')) {
- --- 423,429 ----
- mp -> m_type = UUCPHOST;
- goto got_host;
- }
- ! #endif /* not MMDFMTS */
- if (up && uleq (dfhost, LocalName ())
- && uleq (up, host)) {/* uucpaddr@<uucp> [local] */
- if (pp = index (mbox, '!')) {
- ***************
- *** 438,450 ****
- mp -> m_type = UUCPHOST;
- goto got_host;
- }
- ! #endif MF
- mp -> m_mbox = getcpy (mbox);
- mp -> m_host = getcpy (host);
- }
- else {
- if (pp = index (mbox, '!')) {
- ! *pp++ = NULL;
- mp -> m_mbox = getcpy (pp);
- mp -> m_host = getcpy (mbox);
- mp -> m_type = UUCPHOST;
- --- 438,450 ----
- mp -> m_type = UUCPHOST;
- goto got_host;
- }
- ! #endif /* MF */
- mp -> m_mbox = getcpy (mbox);
- mp -> m_host = getcpy (host);
- }
- else {
- if (pp = index (mbox, '!')) {
- ! *pp++ = '\0';
- mp -> m_mbox = getcpy (pp);
- mp -> m_host = getcpy (mbox);
- mp -> m_type = UUCPHOST;
- ***************
- *** 458,464 ****
- mp -> m_type = dftype;
- }
- else
- ! #endif DUMB
- {
- mp -> m_host = route ? NULLCP : getcpy (dfhost);
- mp -> m_type = route ? NETHOST : dftype;
- --- 458,464 ----
- mp -> m_type = dftype;
- }
- else
- ! #endif /* DUMB */
- {
- mp -> m_host = route ? NULLCP : getcpy (dfhost);
- mp -> m_type = route ? NETHOST : dftype;
- ***************
- *** 476,482 ****
- else
- mp -> m_type = uleq (LocalName (), mp -> m_host) ? LOCALHOST
- : NETHOST;
- ! #else not DUMB
- else
- if (pp = OfficialName (mp -> m_host)) {
- got_real_host: ;
- --- 476,482 ----
- else
- mp -> m_type = uleq (LocalName (), mp -> m_host) ? LOCALHOST
- : NETHOST;
- ! #else /* not DUMB */
- else
- if (pp = OfficialName (mp -> m_host)) {
- got_real_host: ;
- ***************
- *** 494,500 ****
- }
- mp -> m_type = BADHOST;
- }
- ! #endif not DUMB
-
- got_host: ;
- if (route)
- --- 494,500 ----
- }
- mp -> m_type = BADHOST;
- }
- ! #endif /* not DUMB */
-
- got_host: ;
- if (route)
- ***************
- *** 504,510 ****
- mp -> m_gname = getcpy (grp);
- if (note)
- mp -> m_note = getcpy (note);
- ! #endif not BERK
-
- return mp;
- }
- --- 504,510 ----
- mp -> m_gname = getcpy (grp);
- if (note)
- mp -> m_note = getcpy (note);
- ! #endif /* not BERK */
-
- return mp;
- }
- ***************
- *** 534,540 ****
- #ifdef MHMTS
- if (mp -> m_aka)
- free (mp -> m_aka);
- ! #endif MHMTS
-
- free ((char *) mp);
- }
- --- 534,540 ----
- #ifdef MHMTS
- if (mp -> m_aka)
- free (mp -> m_aka);
- ! #endif /* MHMTS */
-
- free ((char *) mp);
- }
- ***************
- *** 548,556 ****
- #ifndef BERK
- #ifdef MF
- char *up = UucpChan ();
- ! #endif MF
- static char addr[BUFSIZ];
- ! #endif not BERK
- static char buffer[BUFSIZ];
-
- #ifdef BERK
- --- 548,556 ----
- #ifndef BERK
- #ifdef MF
- char *up = UucpChan ();
- ! #endif /* MF */
- static char addr[BUFSIZ];
- ! #endif /* not BERK */
- static char buffer[BUFSIZ];
-
- #ifdef BERK
- ***************
- *** 559,565 ****
- (void) sprintf (buffer, "%s <%s>", mp->m_pers, mp->m_mbox);
- else
- (void) strcpy (buffer, mp -> m_text);
- ! #else not BERK
-
- #ifdef MF
- if (up && mp -> m_type == UUCPHOST)
- --- 559,565 ----
- (void) sprintf (buffer, "%s <%s>", mp->m_pers, mp->m_mbox);
- else
- (void) strcpy (buffer, mp -> m_text);
- ! #else /* not BERK */
-
- #ifdef MF
- if (up && mp -> m_type == UUCPHOST)
- ***************
- *** 566,582 ****
- #ifdef MMDFMTS
- (void) sprintf (addr, "%s!%s%%%s@%s", mp -> m_host, mp -> m_mbox,
- up, LocalName ());
- ! #else not MMDFMTS
- (void) sprintf (addr, "%s@%s.%s", mp -> m_mbox, mp -> m_host, up);
- ! #endif not MMDFMTS
- else
- ! #endif MF
-
- #ifdef DUMB
- if (mp -> m_nohost)
- (void) strcpy (addr, mp -> m_mbox ? mp -> m_mbox : "");
- else
- ! #endif DUMB
-
- #ifndef BANG
- if (mp -> m_type != UUCPHOST)
- --- 566,582 ----
- #ifdef MMDFMTS
- (void) sprintf (addr, "%s!%s%%%s@%s", mp -> m_host, mp -> m_mbox,
- up, LocalName ());
- ! #else /* not MMDFMTS */
- (void) sprintf (addr, "%s@%s.%s", mp -> m_mbox, mp -> m_host, up);
- ! #endif /* not MMDFMTS */
- else
- ! #endif /* MF */
-
- #ifdef DUMB
- if (mp -> m_nohost)
- (void) strcpy (addr, mp -> m_mbox ? mp -> m_mbox : "");
- else
- ! #endif /* DUMB */
-
- #ifndef BANG
- if (mp -> m_type != UUCPHOST)
- ***************
- *** 583,589 ****
- (void) sprintf (addr, mp -> m_host ? "%s%s@%s" : "%s%s",
- mp -> m_path ? mp -> m_path : "", mp -> m_mbox, mp -> m_host);
- else
- ! #endif not BANG
- (void) sprintf (addr, "%s!%s", mp -> m_host, mp -> m_mbox);
-
- if (!extras)
- --- 583,589 ----
- (void) sprintf (addr, mp -> m_host ? "%s%s@%s" : "%s%s",
- mp -> m_path ? mp -> m_path : "", mp -> m_mbox, mp -> m_host);
- else
- ! #endif /* not BANG */
- (void) sprintf (addr, "%s!%s", mp -> m_host, mp -> m_mbox);
-
- if (!extras)
- ***************
- *** 603,609 ****
- (void) sprintf (buffer, "%s %s", addr, mp -> m_note);
- else
- (void) strcpy (buffer, addr);
- ! #endif not BERK
-
- return buffer;
- }
- --- 603,609 ----
- (void) sprintf (buffer, "%s %s", addr, mp -> m_note);
- else
- (void) strcpy (buffer, addr);
- ! #endif /* not BERK */
-
- return buffer;
- }
- ***************
- *** 626,632 ****
- #ifdef REALLYDUMB
- return getusr ();
- else
- ! #endif REALLYDUMB
- local = getusr ();
-
- if (domain == NULL)
- --- 626,632 ----
- #ifdef REALLYDUMB
- return getusr ();
- else
- ! #endif /* REALLYDUMB */
- local = getusr ();
-
- if (domain == NULL)
- ***************
- *** 633,646 ****
- #ifdef REALLYDUMB
- return local;
- else
- ! #endif REALLYDUMB
- domain = LocalName ();
-
- #ifndef BANG
- (void) sprintf (addr, "%s@%s", local, domain);
- ! #else BANG
- (void) sprintf (addr, "%s!%s", domain, local);
- ! #endif BANG
-
- return addr;
- }
- --- 633,646 ----
- #ifdef REALLYDUMB
- return local;
- else
- ! #endif /* REALLYDUMB */
- domain = LocalName ();
-
- #ifndef BANG
- (void) sprintf (addr, "%s@%s", local, domain);
- ! #else /* BANG */
- (void) sprintf (addr, "%s!%s", domain, local);
- ! #endif /* BANG */
-
- return addr;
- }
- ***************
- *** 667,673 ****
- #ifndef BERK
- register char *pp;
- char buffer[BUFSIZ];
- ! #endif not BERK
- register struct mailname *mp;
- static char *am = NULL;
- static struct mailname mq={NULL};
- --- 667,673 ----
- #ifndef BERK
- register char *pp;
- char buffer[BUFSIZ];
- ! #endif /* not BERK */
- register struct mailname *mp;
- static char *am = NULL;
- static struct mailname mq={NULL};
- ***************
- *** 700,708 ****
- if (mp -> m_mbox[mp -> m_ingrp - 1] == '*') {
- mp -> m_type |= W_MEND;
- mp -> m_ingrp--;
- ! mp -> m_mbox[mp -> m_ingrp] = NULL;
- }
- ! #else not BERK
- /* owing to screwy munging, wildcarding is a great idea
- even under #ifndef BERK, so... */
- mp -> m_type = W_NIL;
- --- 700,708 ----
- if (mp -> m_mbox[mp -> m_ingrp - 1] == '*') {
- mp -> m_type |= W_MEND;
- mp -> m_ingrp--;
- ! mp -> m_mbox[mp -> m_ingrp] = 0;
- }
- ! #else /* not BERK */
- /* owing to screwy munging, wildcarding is a great idea
- even under #ifndef BERK, so... */
- mp -> m_type = W_NIL;
- ***************
- *** 710,728 ****
- mp -> m_type |= W_MBEG, mp -> m_mbox++;
- if (*(cp = mp -> m_mbox + strlen (mp -> m_mbox) - 1)
- == '*')
- ! mp -> m_type |= W_MEND, *cp = NULL;
- if (mp -> m_host) {
- if (*mp -> m_host == '*')
- mp -> m_type |= W_HBEG, mp -> m_host++;
- if (*(cp = mp -> m_host + strlen (mp -> m_host) - 1)
- == '*')
- ! mp -> m_type |= W_HEND, *cp = NULL;
- }
- if ((cp = getenv ("MHWDEBUG")) && *cp)
- fprintf (stderr, "mbox=\"%s\" host=\"%s\" %s\n",
- mp -> m_mbox, mp -> m_host,
- sprintb (buffer, (unsigned) mp -> m_type, WBITS));
- ! #endif not BERK
- }
- if (oops)
- advise (NULLCP, "please fix the %s: entry in your %s file",
- --- 710,728 ----
- mp -> m_type |= W_MBEG, mp -> m_mbox++;
- if (*(cp = mp -> m_mbox + strlen (mp -> m_mbox) - 1)
- == '*')
- ! mp -> m_type |= W_MEND, *cp = '\0';
- if (mp -> m_host) {
- if (*mp -> m_host == '*')
- mp -> m_type |= W_HBEG, mp -> m_host++;
- if (*(cp = mp -> m_host + strlen (mp -> m_host) - 1)
- == '*')
- ! mp -> m_type |= W_HEND, *cp = '\0';
- }
- if ((cp = getenv ("MHWDEBUG")) && *cp)
- fprintf (stderr, "mbox=\"%s\" host=\"%s\" %s\n",
- mp -> m_mbox, mp -> m_host,
- sprintb (buffer, (unsigned) mp -> m_type, WBITS));
- ! #endif /* not BERK */
- }
- if (oops)
- advise (NULLCP, "please fix the %s: entry in your %s file",
- ***************
- *** 736,742 ****
- cp = np -> m_mbox;
- if (strcmp (cp, mq.m_mbox) == 0)
- return 1;
- ! #else not BERK
- switch (np -> m_type) {
- case NETHOST:
- len = strlen (cp = LocalName ());
- --- 736,742 ----
- cp = np -> m_mbox;
- if (strcmp (cp, mq.m_mbox) == 0)
- return 1;
- ! #else /* not BERK */
- switch (np -> m_type) {
- case NETHOST:
- len = strlen (cp = LocalName ());
- ***************
- *** 756,762 ****
- default:
- break;
- }
- ! #endif not BERK
-
- #ifdef BERK
- len = strlen (cp);
- --- 756,762 ----
- default:
- break;
- }
- ! #endif /* not BERK */
-
- #ifdef BERK
- len = strlen (cp);
- ***************
- *** 783,789 ****
- if (strncmp (&cp[i], mp -> m_mbox, mp -> m_ingrp) == 0)
- return 1;
- }
- ! #else not BERK
- for (mp = &mq; mp = mp -> m_next;) {
- if (np -> m_mbox == NULL)
- continue;
- --- 783,789 ----
- if (strncmp (&cp[i], mp -> m_mbox, mp -> m_ingrp) == 0)
- return 1;
- }
- ! #else /* not BERK */
- for (mp = &mq; mp = mp -> m_next;) {
- if (np -> m_mbox == NULL)
- continue;
- ***************
- *** 836,842 ****
- }
- return 1;
- }
- ! #endif not BERK
-
- return 0;
- }
- --- 836,842 ----
- }
- return 1;
- }
- ! #endif /* not BERK */
-
- return 0;
- }
- *** ../mh-6.7.2/sbr/advertise.c Thu Oct 29 15:00:23 1987
- --- sbr/advertise.c Mon Dec 14 16:20:26 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* advertise.c - the heart of adios */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: advertise.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- ***************
- *** 5,11 ****
- #ifdef BSD42
- #include <sys/types.h>
- #include <sys/uio.h>
- ! #endif BSD42
-
- /* For 4.2BSD systems, use writev() for slightly better performance. Why?
- Well, there are a couple of reasons. Primarily, it gives a smoother
- --- 8,14 ----
- #ifdef BSD42
- #include <sys/types.h>
- #include <sys/uio.h>
- ! #endif /* BSD42 */
-
- /* For 4.2BSD systems, use writev() for slightly better performance. Why?
- Well, there are a couple of reasons. Primarily, it gives a smoother
- ***************
- *** 37,43 ****
- err[BUFSIZ];
- struct iovec iob[20];
- register struct iovec *iov = iob;
- ! #endif BSD42
-
- (void) fflush (stdout);
-
- --- 40,46 ----
- err[BUFSIZ];
- struct iovec iob[20];
- register struct iovec *iov = iob;
- ! #endif /* BSD42 */
-
- (void) fflush (stdout);
-
- ***************
- *** 56,62 ****
- if (tail)
- fprintf (stderr, ", %s", tail);
- (void) fputc ('\n', stderr);
- ! #else BSD42
- (void) fflush (stderr);
-
- if (invo_name && *invo_name) {
- --- 59,65 ----
- if (tail)
- fprintf (stderr, ", %s", tail);
- (void) fputc ('\n', stderr);
- ! #else /* BSD42 */
- (void) fflush (stderr);
-
- if (invo_name && *invo_name) {
- ***************
- *** 95,99 ****
- iov -> iov_len = strlen (iov -> iov_base = "\n");
- iov++;
- (void) writev (fileno (stderr), iob, iov - iob);
- ! #endif BSD42
- }
- --- 98,102 ----
- iov -> iov_len = strlen (iov -> iov_base = "\n");
- iov++;
- (void) writev (fileno (stderr), iob, iov - iob);
- ! #endif /* BSD42 */
- }
- *** ../mh-6.7.2/sbr/closefds.c Thu Oct 29 15:00:26 1987
- --- sbr/closefds.c Mon Dec 14 16:20:27 1992
- ***************
- *** 1,9 ****
- /* closefds.c - close-up fd:s */
-
- #include "../h/mh.h"
- #ifndef BSD42
- #include <stdio.h>
- ! #endif not BSD42
-
-
- void closefds (i)
- --- 1,12 ----
- /* closefds.c - close-up fd:s */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: closefds.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #ifndef BSD42
- #include <stdio.h>
- ! #endif /* not BSD42 */
-
-
- void closefds (i)
- ***************
- *** 11,23 ****
- {
- #ifndef BSD42
- int nbits = _NFILE;
- ! #else BSD42
- int nbits = getdtablesize ();
- ! #endif BSD42
-
- for (; i < nbits; i++)
- #ifdef OVERHEAD
- if (i != fd_def && i != fd_ctx)
- ! #endif OVERHEAD
- (void) close (i);
- }
- --- 14,26 ----
- {
- #ifndef BSD42
- int nbits = _NFILE;
- ! #else /* BSD42 */
- int nbits = getdtablesize ();
- ! #endif /* BSD42 */
-
- for (; i < nbits; i++)
- #ifdef OVERHEAD
- if (i != fd_def && i != fd_ctx)
- ! #endif /* OVERHEAD */
- (void) close (i);
- }
- *** ../mh-6.7.2/sbr/cpydgst.c Thu Oct 29 15:00:27 1987
- --- sbr/cpydgst.c Mon Dec 14 16:20:27 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* cpydgst.c - copy from one fd to another in encapsulating mode */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: cpydgst.c,v 1.4 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- ***************
- *** 46,52 ****
- dp = (bp = outbuf) + sizeof outbuf;
- for (state = S1; (i = read (in, buffer, sizeof buffer)) > 0;)
- for (ep = (cp = buffer) + i; cp < ep; cp++) {
- ! if (*cp == NULL)
- continue;
- switch (state) {
- case S1:
- --- 49,55 ----
- dp = (bp = outbuf) + sizeof outbuf;
- for (state = S1; (i = read (in, buffer, sizeof buffer)) > 0;)
- for (ep = (cp = buffer) + i; cp < ep; cp++) {
- ! if (*cp == '\0')
- continue;
- switch (state) {
- case S1:
- *** ../mh-6.7.2/sbr/discard.c Thu Feb 14 14:49:10 1991
- --- sbr/discard.c Mon Dec 14 16:20:28 1992
- ***************
- *** 1,19 ****
- /* discard.c - discard output on a file pointer */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: discard.c,v 1.4 90/04/05 15:31:32 sources Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include <stdio.h>
- #ifndef SYS5
- #include <sgtty.h>
- ! #else SYS5
- #include <sys/types.h>
- #include <termio.h>
- #ifndef NOIOCTLH
- #include <sys/ioctl.h>
- ! #endif NOIOCTLH
- ! #endif SYS5
-
-
- void discard (io)
- --- 1,19 ----
- /* discard.c - discard output on a file pointer */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: discard.c,v 1.6 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- #ifndef SYS5
- #include <sgtty.h>
- ! #else /* SYS5 */
- #include <sys/types.h>
- #include <termio.h>
- #ifndef NOIOCTLH
- #include <sys/ioctl.h>
- ! #endif /* NOIOCTLH */
- ! #endif /* SYS5 */
-
-
- void discard (io)
- ***************
- *** 21,29 ****
- {
- #ifndef SYS5
- struct sgttyb sg;
- ! #else SYS5
- struct termio sg;
- ! #endif SYS5
-
- if (io == NULL)
- return;
- --- 21,29 ----
- {
- #ifndef SYS5
- struct sgttyb sg;
- ! #else /* SYS5 */
- struct termio sg;
- ! #endif /* SYS5 */
-
- if (io == NULL)
- return;
- ***************
- *** 31,40 ****
- #ifndef SYS5
- if (ioctl (fileno (io), TIOCGETP, (char *) &sg) != NOTOK)
- (void) ioctl (fileno (io), TIOCSETP, (char *) &sg);
- ! #else SYS5
- if (ioctl (fileno (io), TCGETA, &sg) != NOTOK)
- (void) ioctl (fileno (io), TCSETA, &sg);
- ! #endif SYS5
-
- if (io -> _ptr = io -> _base)
- io -> _cnt = 0;
- --- 31,40 ----
- #ifndef SYS5
- if (ioctl (fileno (io), TIOCGETP, (char *) &sg) != NOTOK)
- (void) ioctl (fileno (io), TIOCSETP, (char *) &sg);
- ! #else /* SYS5 */
- if (ioctl (fileno (io), TCGETA, &sg) != NOTOK)
- (void) ioctl (fileno (io), TCSETA, &sg);
- ! #endif /* SYS5 */
-
- if (io -> _ptr = io -> _base)
- io -> _cnt = 0;
- *** ../mh-6.7.2/sbr/fmtcompile.c Thu Jan 23 15:11:10 1992
- --- sbr/fmtcompile.c Mon Dec 14 16:20:29 1992
- ***************
- *** 1,7 ****
- /* fmtcompile.c - "compile" format strings for fmtscan */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: fmtcompile.c,v 1.10 1992/01/23 23:10:58 jromine Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include "../h/addrsbr.h"
- --- 1,7 ----
- /* fmtcompile.c - "compile" format strings for fmtscan */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: fmtcompile.c,v 1.15 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include "../h/addrsbr.h"
- ***************
- *** 72,77 ****
- --- 72,78 ----
- "cur", TF_NONE, FT_LV_DAT, 1, TFL_PUTN,
- "size", TF_NONE, FT_LV_DAT, 2, TFL_PUTN,
- "width", TF_NONE, FT_LV_DAT, 3, TFL_PUTN,
- + "unseen", TF_NONE, FT_LV_DAT, 4, TFL_PUTN,
- "dat", TF_NUM, FT_LV_DAT, 0, TFL_PUTN,
- "strlen", TF_NONE, FT_LV_STRLEN, 0, TFL_PUTN,
- "me", TF_MYBOX, FT_LS_LIT, 0, TFL_PUTS,
- ***************
- *** 78,83 ****
- --- 79,85 ----
- "plus", TF_NUM, FT_LV_PLUS_L, 0, TFL_PUTN,
- "minus", TF_NUM, FT_LV_MINUS_L, 0, TFL_PUTN,
- "divide", TF_NUM, FT_LV_DIVIDE_L, 0, TFL_PUTN,
- + "modulo", TF_NUM, FT_LV_MODULO_L, 0, TFL_PUTN,
- "charleft", TF_NONE, FT_LV_CHAR_LEFT, 0, TFL_PUTN,
- "timenow", TF_NOW, FT_LV_LIT, 0, TFL_PUTN,
-
- ***************
- *** 121,129 ****
- "friendly", TF_COMP, FT_LS_FRIENDLY, FT_PARSEADDR, TFL_PUTS,
-
- "mymbox", TF_COMP, FT_LV_COMPFLAG, FT_MYMBOX, TFL_PUTN,
- - #ifdef VAN
- "addtoseq", TF_STR, FT_ADDTOSEQ, 0, 0,
- - #endif
-
- (char *)0, 0, 0, 0, 0
- };
- --- 123,129 ----
- ***************
- *** 194,200 ****
- --- 194,204 ----
-
- usr_fstring[errpos] = '\0';
- for (i = errpos-errctx; i < errpos; i++)
- + #ifdef LOCALE
- + if (iscntrl(usr_fstring[i]))
- + #else
- if (usr_fstring[i] < 32)
- + #endif
- usr_fstring[i] = '_';
- advise(NULLCP, "\"%s\": format compile error - %s",
- &usr_fstring[errpos-errctx], str);
- ***************
- *** 293,298 ****
- --- 297,308 ----
- cp = do_loop(++cp);
- break;
-
- + case ';': /* comment line */
- + cp++;
- + while ((c = *cp++) && c != '\n')
- + continue;
- + break;
- +
- default:
- cp = do_spec(cp);
- break;
- ***************
- *** 308,314 ****
- register int c;
- #ifndef lint
- register int ljust = 0;
- ! #endif not lint
- register int wid = 0;
- register char fill = ' ';
-
- --- 318,324 ----
- register int c;
- #ifndef lint
- register int ljust = 0;
- ! #endif /* not lint */
- register int wid = 0;
- register char fill = ' ';
-
- ***************
- *** 419,424 ****
- --- 429,435 ----
- register int c;
- register struct ftable *t;
- register int n;
- + int mflag; /* minus sign in NUM */
-
- infunction++;
-
- ***************
- *** 446,456 ****
- --- 457,471 ----
- break;
-
- case TF_NUM:
- + if (mflag = (c == '-'))
- + c = *cp++;
- n = 0;
- while (isdigit(c)) {
- n = n*10 + (c - '0');
- c = *cp++;
- }
- + if (mflag)
- + n = (-n);
- LV(t->f_type,n);
- break;
-
- ***************
- *** 480,486 ****
- case TF_EXPR:
- *--cp = c;
- cp = do_expr(cp, t->extra);
- ! LV(t->f_type, t->extra);
- c = *cp++;
- ftbl = t;
- break;
- --- 495,501 ----
- case TF_EXPR:
- *--cp = c;
- cp = do_expr(cp, t->extra);
- ! LV(t->f_type, 0);
- c = *cp++;
- ftbl = t;
- break;
- *** ../mh-6.7.2/sbr/formatdef.c Fri Jan 24 10:22:19 1992
- --- sbr/formatdef.c Mon Dec 14 16:20:29 1992
- ***************
- *** 1,7 ****
- /* formatdef.c - some defines for sbr/formatsbr.c */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: formatdef.c,v 1.2 1992/01/24 18:22:15 jromine Exp $";
- ! #endif lint
- #include "../h/addrsbr.h"
-
- int fmt_norm = AD_NAME;
- --- 1,7 ----
- /* formatdef.c - some defines for sbr/formatsbr.c */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: formatdef.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
- #include "../h/addrsbr.h"
-
- int fmt_norm = AD_NAME;
- *** ../mh-6.7.2/sbr/formatsbr.c Fri Jan 24 10:09:34 1992
- --- sbr/formatsbr.c Mon Dec 14 16:20:31 1992
- ***************
- *** 1,7 ****
- /* formatsbr.c - format string interpretation */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: formatsbr.c,v 1.14 1992/01/24 18:09:25 jromine Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include "../h/addrsbr.h"
- --- 1,7 ----
- /* formatsbr.c - format string interpretation */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: formatsbr.c,v 1.21 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include "../h/addrsbr.h"
- ***************
- *** 21,31 ****
-
- static char *formats = 0;
- extern char *formataddr (); /* hook for custom address formatting */
- ! #ifdef VAN
- struct msgs *fmt_current_folder; /* current folder (set by main program) */
- #endif
-
- static normalize();
-
- extern int fmt_norm; /* defined in sbr/formatdef.c = AD_NAME */
- struct mailname fmt_mnull;
- --- 21,32 ----
-
- static char *formats = 0;
- extern char *formataddr (); /* hook for custom address formatting */
- ! #ifdef LBL
- struct msgs *fmt_current_folder; /* current folder (set by main program) */
- #endif
-
- static normalize();
- + static int get_x400_comp();
-
- extern int fmt_norm; /* defined in sbr/formatdef.c = AD_NAME */
- struct mailname fmt_mnull;
- ***************
- *** 96,102 ****
- case '\n':
- break;
-
- ! case NULL:
- cp--; /* fall */
- default:
- *dp++ = *cp;
- --- 97,103 ----
- case '\n':
- break;
-
- ! case 0:
- cp--; /* fall */
- default:
- *dp++ = *cp;
- ***************
- *** 103,109 ****
- break;
- }
-
- ! *dp = NULL;
- }
-
- /* */
- --- 104,110 ----
- break;
- }
-
- ! *dp = 0;
- }
-
- /* */
- ***************
- *** 121,127 ****
- --- 122,142 ----
- register char *s1;
- register char *s2;
-
- + #ifdef LOCALE
- while (c1 = *sub) {
- + c1 = (isalpha(c1) && isupper(c1)) ? tolower(c1) : c1;
- + while ((c2 = *str++) && c1 != ((isalpha(c2) && isupper(c2)) ? tolower(c2) : c2))
- + ;
- + if (! c2)
- + return 0;
- + s1 = sub + 1; s2 = str;
- + while ((c1 = *s1++) && ((isalpha(c1) && isupper(c1)) ? tolower(c1) : c1) == ((isalpha(c2 =*s2++) && isupper(c2)) ? tolower(c2) : c2))
- + ;
- + if (! c1)
- + return 1;
- + }
- + #else
- + while (c1 = *sub) {
- while ((c2 = *str++) && (c1 | 040) != (c2 | 040))
- ;
- if (! c2)
- ***************
- *** 132,137 ****
- --- 147,153 ----
- if (! c1)
- return 1;
- }
- + #endif
- return 1;
- }
- /* */
- ***************
- *** 169,174 ****
- --- 185,191 ----
- }\
- }\
- }
- + #ifdef LOCALE
- #define PUTSF(cp, str, wid, fill) {\
- ljust = 0;\
- if ((i = (wid)) < 0) {\
- ***************
- *** 186,191 ****
- --- 203,256 ----
- i++;\
- }\
- } else {\
- + while ((c = *sp) && (iscntrl(c) || isspace(c)))\
- + sp++;\
- + }\
- + while ((c = *sp++) && --i >= 0 && cp < ep)\
- + if (isgraph(c)) \
- + *cp++ = c;\
- + else {\
- + while ((c = *sp) && (iscntrl(c) || isspace(c)))\
- + sp++;\
- + *cp++ = ' ';\
- + }\
- + }\
- + if (!ljust)\
- + while( --i >= 0 && cp < ep)\
- + *cp++ = fill;\
- + }
- + #define PUTS(cp, str) {\
- + if (sp = (str)) {\
- + while ((c = *sp) && (iscntrl(c) || isspace(c)))\
- + sp++;\
- + while((c = *sp++) && cp < ep)\
- + if (isgraph(c)) \
- + *cp++ = c;\
- + else {\
- + while ((c = *sp) && (iscntrl(c) || isspace(c)))\
- + sp++;\
- + *cp++ = ' ';\
- + }\
- + }\
- + }
- + #else /* LOCALE */
- + #define PUTSF(cp, str, wid, fill) {\
- + ljust = 0;\
- + if ((i = (wid)) < 0) {\
- + i = -i;\
- + ljust++;\
- + }\
- + if (sp = (str)) {\
- + if (ljust) {\
- + c = strlen(sp);\
- + if (c > i)\
- + sp += c - i;\
- + else {\
- + while( --i >= c && cp < ep)\
- + *cp++ = fill;\
- + i++;\
- + }\
- + } else {\
- while ((c = *sp) && c <= 32)\
- sp++;\
- }\
- ***************
- *** 216,221 ****
- --- 281,287 ----
- }\
- }\
- }
- + #endif
-
-
- static char *lmonth[] = { "January", "February","March", "April",
- ***************
- *** 222,228 ****
- --- 288,341 ----
- "May", "June", "July", "August",
- "September","October", "November","December" };
-
- + static char *get_x400_friendly (mbox, buffer)
- + char *mbox,
- + *buffer;
- + {
- + char given[BUFSIZ],
- + surname[BUFSIZ];
-
- + if (mbox == NULLCP)
- + return NULLCP;
- + if (*mbox == '"')
- + mbox++;
- + if (*mbox != '/')
- + return NULLCP;
- +
- + if (get_x400_comp (mbox, "/PN=", buffer)) {
- + for (mbox = buffer; mbox = index (mbox, '.'); )
- + *mbox++ = 0;
- +
- + return buffer;
- + }
- +
- + if (!get_x400_comp (mbox, "/S=", surname))
- + return NULLCP;
- +
- + if (get_x400_comp (mbox, "/G=", given))
- + (void) sprintf (buffer, "%s %s", given, surname);
- + else
- + (void) strcpy (buffer, surname);
- +
- + return buffer;
- + }
- +
- + static int get_x400_comp (mbox, key, buffer)
- + char *mbox,
- + *key,
- + *buffer;
- + {
- + int idx;
- + char *cp;
- +
- + if ((idx = stringdex (key, mbox)) < 0
- + || !(cp = index (mbox += idx + strlen (key), '/')))
- + return 0;
- +
- + (void) sprintf (buffer, "%*.*s", cp - mbox, cp - mbox, mbox);
- + return 1;
- + }
- +
- struct format *
- fmtscan (format, scanl, width, dat)
- struct format *format;
- ***************
- *** 299,305 ****
- goto finished;
-
- case FT_IF_S:
- ! if (str == NULLCP || *str == NULL) {
- fmt += fmt->f_skip;
- continue;
- }
- --- 412,418 ----
- goto finished;
-
- case FT_IF_S:
- ! if (!(value = (str && *str))) {
- fmt += fmt->f_skip;
- continue;
- }
- ***************
- *** 306,312 ****
- break;
-
- case FT_IF_S_NULL:
- ! if (str != NULLCP && *str != NULL) {
- fmt += fmt->f_skip;
- continue;
- }
- --- 419,425 ----
- break;
-
- case FT_IF_S_NULL:
- ! if (!(value = (str == NULLCP || *str == 0))) {
- fmt += fmt->f_skip;
- continue;
- }
- ***************
- *** 334,340 ****
- break;
-
- case FT_IF_MATCH:
- ! if (!str || !match (str, fmt->f_text)) {
- fmt += fmt->f_skip;
- continue;
- }
- --- 447,453 ----
- break;
-
- case FT_IF_MATCH:
- ! if (!(value = (str && match (str, fmt->f_text)))) {
- fmt += fmt->f_skip;
- continue;
- }
- ***************
- *** 342,354 ****
-
- case FT_V_MATCH:
- if (str)
- ! value = match (str, fmt->f_text);
- else
- value = 0;
- break;
-
- case FT_IF_AMATCH:
- ! if (!str || !uprf (str, fmt->f_text)) {
- fmt += fmt->f_skip;
- continue;
- }
- --- 455,467 ----
-
- case FT_V_MATCH:
- if (str)
- ! value = match (str, fmt->f_text);
- else
- value = 0;
- break;
-
- case FT_IF_AMATCH:
- ! if (!(value = (str && uprf (str, fmt->f_text)))) {
- fmt += fmt->f_skip;
- continue;
- }
- ***************
- *** 359,369 ****
- break;
-
- case FT_S_NONNULL:
- ! value = (str != NULLCP && *str != NULL);
- break;
-
- case FT_S_NULL:
- ! value = (str == NULLCP || *str == NULL);
- break;
-
- case FT_V_EQ:
- --- 472,482 ----
- break;
-
- case FT_S_NONNULL:
- ! value = (str != NULLCP && *str != 0);
- break;
-
- case FT_S_NULL:
- ! value = (str == NULLCP || *str == 0);
- break;
-
- case FT_V_EQ:
- ***************
- *** 450,455 ****
- --- 563,574 ----
- else
- value = 0;
- break;
- + case FT_LV_MODULO_L:
- + if (fmt->f_value)
- + value = value % fmt->f_value;
- + else
- + value = 0;
- + break;
- case FT_SAVESTR:
- savestr = str;
- break;
- ***************
- *** 479,485 ****
- --- 598,608 ----
- str = dtwszone (fmt->f_comp->c_tws);
- break;
- case FT_LV_YEAR:
- + #ifndef YEARMOD
- value = fmt->f_comp->c_tws->tw_year;
- + #else /* YEARMOD */
- + value = (fmt->f_comp->c_tws->tw_year) % 100;
- + #endif /* YEARMOD */
- break;
- case FT_LV_WDAY:
- if (!(((tws = fmt->f_comp->c_tws)->tw_flags) & (TW_SEXP|TW_SIMP)))
- ***************
- *** 572,578 ****
- case FT_LS_FRIENDLY:
- #ifdef BERK
- str = fmt->f_comp->c_mn->m_mbox;
- ! #else not BERK
- if ((mn = fmt -> f_comp -> c_mn) == &fmt_mnull) {
- str = fmt -> f_comp -> c_text;
- break;
- --- 695,701 ----
- case FT_LS_FRIENDLY:
- #ifdef BERK
- str = fmt->f_comp->c_mn->m_mbox;
- ! #else /* not BERK */
- if ((mn = fmt -> f_comp -> c_mn) == &fmt_mnull) {
- str = fmt -> f_comp -> c_text;
- break;
- ***************
- *** 594,600 ****
- else
- break;
- }
- ! } else {
- unfriendly: ;
- switch (mn -> m_type) {
- case LOCALHOST:
- --- 717,723 ----
- else
- break;
- }
- ! } else if (!(str = get_x400_friendly (mn -> m_mbox, buffer))) {
- unfriendly: ;
- switch (mn -> m_type) {
- case LOCALHOST:
- ***************
- *** 616,622 ****
- break;
- }
- }
- ! #endif BERK
- break;
-
- case FT_LOCALDATE:
- --- 739,745 ----
- break;
- }
- }
- ! #endif /* BERK */
- break;
-
- case FT_LOCALDATE:
- ***************
- *** 736,743 ****
- }
- break;
-
- - #ifdef VAN
- case FT_ADDTOSEQ:
- /* If we're working on a folder (as opposed to a file), add the
- * current msg to sequence given in literal field. Don't
- * disturb string or value registers.
- --- 859,866 ----
- }
- break;
-
- case FT_ADDTOSEQ:
- + #ifdef LBL
- /* If we're working on a folder (as opposed to a file), add the
- * current msg to sequence given in literal field. Don't
- * disturb string or value registers.
- ***************
- *** 744,751 ****
- */
- if (fmt_current_folder)
- (void)m_seqadd(fmt_current_folder, fmt->f_text, dat[0], -1);
- - break;
- #endif
- }
- fmt++;
- }
- --- 867,874 ----
- */
- if (fmt_current_folder)
- (void)m_seqadd(fmt_current_folder, fmt->f_text, dat[0], -1);
- #endif
- + break;
- }
- fmt++;
- }
- ***************
- *** 753,759 ****
- finished:;
- if (cp[-1] != '\n')
- *cp++ = '\n';
- ! *cp = NULL;
- return ((struct format *)0);
- #else /* JLR */
- if (cp[-1] != '\n')
- --- 876,882 ----
- finished:;
- if (cp[-1] != '\n')
- *cp++ = '\n';
- ! *cp = 0;
- return ((struct format *)0);
- #else /* JLR */
- if (cp[-1] != '\n')
- *** ../mh-6.7.2/sbr/gans.c Thu Oct 29 15:00:30 1987
- --- sbr/gans.c Mon Oct 26 14:50:54 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* gans.c - get an answer from the user */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: gans.c,v 1.2 1992/10/26 22:50:52 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- ***************
- *** 21,28 ****
- --- 24,35 ----
- if (i == EOF)
- return 0;
- if (cp < &ansbuf[sizeof ansbuf - 1]) {
- + #ifdef LOCALE
- + i = (isalpha(i) && isupper(i)) ? tolower(i) : i;
- + #else
- if (i >= 'A' && i <= 'Z')
- i += 'a' - 'A';
- + #endif
- *cp++ = i;
- }
- }
- *** ../mh-6.7.2/sbr/getans.c Tue Feb 6 13:03:44 1990
- --- sbr/getans.c Mon Dec 14 16:20:32 1992
- ***************
- *** 1,9 ****
- /* getans.c - get an answer from the user and return a string array */
-
- #include "../h/mh.h"
- #ifdef BSD42
- #include <setjmp.h>
- ! #endif BSD42
- #include <signal.h>
- #include <stdio.h>
-
- --- 1,12 ----
- /* getans.c - get an answer from the user and return a string array */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: getans.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #ifdef BSD42
- #include <setjmp.h>
- ! #endif /* BSD42 */
- #include <signal.h>
- #include <stdio.h>
-
- ***************
- *** 11,20 ****
- static char ansbuf[BUFSIZ];
- #ifndef BSD42
- static int interrupted;
- ! #else BSD42
- static jmp_buf sigenv;
- ! #endif BSD42
- ! static int intrser ();
-
- char **getans (prompt, ansp)
- char *prompt;
- --- 14,23 ----
- static char ansbuf[BUFSIZ];
- #ifndef BSD42
- static int interrupted;
- ! #else /* BSD42 */
- static jmp_buf sigenv;
- ! #endif /* BSD42 */
- ! static TYPESIG intrser ();
-
- char **getans (prompt, ansp)
- char *prompt;
- ***************
- *** 28,34 ****
- #ifndef BSD42
- interrupted = 0;
- istat = signal (SIGINT, intrser);
- ! #else BSD42
- switch (setjmp (sigenv)) {
- case OK:
- istat = signal (SIGINT, intrser);
- --- 31,37 ----
- #ifndef BSD42
- interrupted = 0;
- istat = signal (SIGINT, intrser);
- ! #else /* BSD42 */
- switch (setjmp (sigenv)) {
- case OK:
- istat = signal (SIGINT, intrser);
- ***************
- *** 38,44 ****
- (void) signal (SIGINT, istat);
- return NULL;
- }
- ! #endif BSD42
- for (;;) {
- printf ("%s", prompt);
- (void) fflush (stdout);
- --- 41,47 ----
- (void) signal (SIGINT, istat);
- return NULL;
- }
- ! #endif /* BSD42 */
- for (;;) {
- printf ("%s", prompt);
- (void) fflush (stdout);
- ***************
- *** 50,59 ****
- (void) signal (SIGINT, istat);
- return NULL;
- }
- ! #else BSD42
- if (i == EOF)
- longjmp (sigenv, DONE);
- ! #endif BSD42
- if (cp < &ansbuf[sizeof ansbuf - 1])
- *cp++ = i;
- }
- --- 53,62 ----
- (void) signal (SIGINT, istat);
- return NULL;
- }
- ! #else /* BSD42 */
- if (i == EOF)
- longjmp (sigenv, DONE);
- ! #endif /* BSD42 */
- if (cp < &ansbuf[sizeof ansbuf - 1])
- *cp++ = i;
- }
- ***************
- *** 79,89 ****
- }
-
-
- ! static int intrser () {
- #ifndef BSD42
- (void) signal(SIGINT, intrser);
- interrupted = 1;
- ! #else BSD42
- longjmp (sigenv, NOTOK);
- ! #endif BSD42
- }
- --- 82,94 ----
- }
-
-
- ! static TYPESIG intrser (i)
- ! int i;
- ! {
- #ifndef BSD42
- (void) signal(SIGINT, intrser);
- interrupted = 1;
- ! #else /* BSD42 */
- longjmp (sigenv, NOTOK);
- ! #endif /* BSD42 */
- }
- *** ../mh-6.7.2/sbr/help.c Fri Jan 24 17:19:15 1992
- --- sbr/help.c Mon Dec 14 16:20:33 1992
- ***************
- *** 1,7 ****
- /* help.c - print the usage line */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: help.c,v 1.2 1992/01/25 01:19:05 jromine Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include <stdio.h>
- --- 1,7 ----
- /* help.c - print the usage line */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: help.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- *** ../mh-6.7.2/sbr/m_atoi.c Thu Oct 29 15:00:32 1987
- --- sbr/m_atoi.c Mon Oct 26 14:52:09 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* m_atoi.c - parse a string representation of a message number */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: m_atoi.c,v 1.2 1992/10/26 22:52:05 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
-
- ***************
- *** 11,16 ****
- --- 14,25 ----
-
- i = 0;
- cp = str;
- + #ifdef LOCALE
- + while (isdigit(*cp)) {
- + i *= 10;
- + i += *cp++ - '0';
- + }
- + #else
- while (*cp) {
- if (*cp < '0' || *cp > '9')
- return 0;
- ***************
- *** 17,22 ****
- --- 26,32 ----
- i *= 10;
- i += *cp++ - '0';
- }
- + #endif
-
- return i;
- }
- *** ../mh-6.7.2/sbr/m_convert.c Tue Feb 12 16:51:12 1991
- --- sbr/m_convert.c Mon Dec 14 16:20:34 1992
- ***************
- *** 1,7 ****
- /* m_convert.c - parse a message sequence and set SELECTED */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: m_convert.c,v 1.7 91/02/12 16:51:00 mh Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include <stdio.h>
- --- 1,7 ----
- /* m_convert.c - parse a message sequence and set SELECTED */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: m_convert.c,v 1.10 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- ***************
- *** 213,221 ****
- }
-
- bp = buf;
- while ((*cp >= 'a' && *cp <= 'z') || *cp == '.')
- *bp++ = *cp++;
- ! *bp++ = NULL;
- delimp = cp;
-
- if (strcmp (buf, "first") == 0)
- --- 213,225 ----
- }
-
- bp = buf;
- + #ifndef LOCALE
- while ((*cp >= 'a' && *cp <= 'z') || *cp == '.')
- + #else
- + while (isalpha(*cp) || *cp == '.') /* doesn't enforce lower case */
- + #endif /* LOCALE */
- *bp++ = *cp++;
- ! *bp++ = 0;
- delimp = cp;
-
- if (strcmp (buf, "first") == 0)
- *** ../mh-6.7.2/sbr/m_draft.c Thu Oct 29 15:00:34 1987
- --- sbr/m_draft.c Mon Dec 14 16:20:34 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* m_draft.c - construct the draft name */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: m_draft.c,v 1.2 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include <errno.h>
- ***************
- *** 21,27 ****
- struct stat st;
- static char buffer[BUFSIZ];
-
- ! if (*isdf == NOTOK || folder == NULL || *folder == NULL) {
- if (*isdf == NOTOK || (cp = m_find ("Draft-Folder")) == NULL) {
- *isdf = 0;
- return m_maildir (msg && *msg ? msg : draft);
- --- 24,30 ----
- struct stat st;
- static char buffer[BUFSIZ];
-
- ! if (*isdf == NOTOK || folder == NULL || *folder == 0) {
- if (*isdf == NOTOK || (cp = m_find ("Draft-Folder")) == NULL) {
- *isdf = 0;
- return m_maildir (msg && *msg ? msg : draft);
- *** ../mh-6.7.2/sbr/m_fmsg.c Thu Oct 29 15:00:35 1987
- --- sbr/m_fmsg.c Mon Dec 14 16:20:35 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* m_fmsg.c - free a folder */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: m_fmsg.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- ***************
- *** 16,22 ****
- free (mp -> foldpath);
- #ifdef MTR
- free ((char *) mp -> msgbase);
- ! #endif MTR
- for (i = 0; mp -> msgattrs[i]; i++)
- free (mp -> msgattrs[i]);
- free ((char *) mp);
- --- 19,25 ----
- free (mp -> foldpath);
- #ifdef MTR
- free ((char *) mp -> msgbase);
- ! #endif /* MTR */
- for (i = 0; mp -> msgattrs[i]; i++)
- free (mp -> msgattrs[i]);
- free ((char *) mp);
- *** ../mh-6.7.2/sbr/m_getdefs.c Thu Oct 29 15:00:37 1987
- --- sbr/m_getdefs.c Mon Dec 14 16:20:36 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* m_getdefs.c - read the user's MH environment */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: m_getdefs.c,v 1.6 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- ***************
- *** 10,27 ****
-
- extern int errno;
-
- struct passwd *getpwuid ();
-
-
- #ifndef OVERHEAD
- #define FOpen(f,m,e,c) fopen (f, m)
- #define FClose(f) fclose (f)
- ! #else OVERHEAD
- FILE *FOpen ();
- int FClose ();
-
- long lseek ();
- ! #endif OVERHEAD
-
-
- void m_getdefs() {
- --- 13,34 ----
-
- extern int errno;
-
- + #ifndef __STDC__
- + #ifdef SYS5
- struct passwd *getpwuid ();
- + #endif
- + #endif /* !__STDC__ */
-
-
- #ifndef OVERHEAD
- #define FOpen(f,m,e,c) fopen (f, m)
- #define FClose(f) fclose (f)
- ! #else /* OVERHEAD */
- FILE *FOpen ();
- int FClose ();
-
- long lseek ();
- ! #endif /* OVERHEAD */
-
-
- void m_getdefs() {
- ***************
- *** 30,36 ****
- *pp;
- #if defined (notdef) || defined (COMPAT)
- register char *ctx;
- ! #endif notdef or COMPAT
- char buf[BUFSIZ];
- struct stat st;
- register struct passwd *pw;
- --- 37,43 ----
- *pp;
- #if defined (notdef) || defined (COMPAT)
- register char *ctx;
- ! #endif /* notdef or COMPAT */
- char buf[BUFSIZ];
- struct stat st;
- register struct passwd *pw;
- ***************
- *** 44,55 ****
- else
- if ((pw = getpwuid (getuid ())) == NULL
- || pw -> pw_dir == NULL
- ! || *pw -> pw_dir == NULL)
- adios (NULLCP, "no HOME envariable");
- else
- mypath = getcpy (pw -> pw_dir);
- if ((cp = mypath + strlen (mypath) - 1) > mypath && *cp == '/')
- ! *cp = NULL;
- }
-
- if ((cp = getenv ("MH")) && *cp) {
- --- 51,62 ----
- else
- if ((pw = getpwuid (getuid ())) == NULL
- || pw -> pw_dir == NULL
- ! || *pw -> pw_dir == 0)
- adios (NULLCP, "no HOME envariable");
- else
- mypath = getcpy (pw -> pw_dir);
- if ((cp = mypath + strlen (mypath) - 1) > mypath && *cp == '/')
- ! *cp = 0;
- }
-
- if ((cp = getenv ("MH")) && *cp) {
- ***************
- *** 57,63 ****
- if ((ib = FOpen (defpath, "r", "MHFD", 0)) == NULL)
- adios (defpath, "unable to read");
- if (*cp != '/')
- ! (void) putenv ("MH", defpath);
- }
- else {
- defpath = concat (mypath, "/", mh_profile, NULLCP);
- --- 64,70 ----
- if ((ib = FOpen (defpath, "r", "MHFD", 0)) == NULL)
- adios (defpath, "unable to read");
- if (*cp != '/')
- ! (void) m_putenv ("MH", defpath);
- }
- else {
- defpath = concat (mypath, "/", mh_profile, NULLCP);
- ***************
- *** 85,91 ****
-
- #if defined (notdef) || defined (COMPAT)
- ctx = context;
- ! #endif notdef or COMPAT
- m_readefs (&m_defs, ib, mh_profile, 0);
- (void) FClose (ib);
-
- --- 92,98 ----
-
- #if defined (notdef) || defined (COMPAT)
- ctx = context;
- ! #endif /* notdef or COMPAT */
- m_readefs (&m_defs, ib, mh_profile, 0);
- (void) FClose (ib);
-
- ***************
- *** 136,144 ****
- (void) FClose (ib);
- }
- free (ctxpath);
- ! #endif COMPAT
-
- ! if ((cp = getenv ("MHCONTEXT")) == NULL || *cp == NULL)
- cp = context;
- if ((ib = FOpen (ctxpath = getcpy (m_maildir (cp)), "r", "MHCONTEXTFD", 1))
- == NULL) {
- --- 143,151 ----
- (void) FClose (ib);
- }
- free (ctxpath);
- ! #endif /* COMPAT */
-
- ! if ((cp = getenv ("MHCONTEXT")) == NULL || *cp == 0)
- cp = context;
- if ((ib = FOpen (ctxpath = getcpy (m_maildir (cp)), "r", "MHCONTEXTFD", 1))
- == NULL) {
- ***************
- *** 145,151 ****
- #ifdef notdef /* XXX */
- if (cp != ctx)
- adios (ctxpath, "unable to read");
- ! #endif notdef
- }
- else {
- m_readefs ((struct node **) 0, ib, cp, 1);
- --- 152,158 ----
- #ifdef notdef /* XXX */
- if (cp != ctx)
- adios (ctxpath, "unable to read");
- ! #endif /* notdef */
- }
- else {
- m_readefs ((struct node **) 0, ib, cp, 1);
- ***************
- *** 172,178 ****
- struct stat st1;
- register FILE * fp;
-
- ! if ((cp = getenv (envariable)) == NULL || *cp == NULL)
- goto not_open;
-
- if ((fd = atoi (cp)) <= fileno (stderr)) {
- --- 179,185 ----
- struct stat st1;
- register FILE * fp;
-
- ! if ((cp = getenv (envariable)) == NULL || *cp == 0)
- goto not_open;
-
- if ((fd = atoi (cp)) <= fileno (stderr)) {
- ***************
- *** 191,197 ****
- && !strcmp (mode, "r")
- && fileno (fp) > fileno (stderr)) {
- (void) sprintf (buffer, "%d", fileno (fp));
- ! if (!putenv (envariable, buffer))
- if (ctx)
- fd_ctx = fileno (fp);
- else
- --- 198,204 ----
- && !strcmp (mode, "r")
- && fileno (fp) > fileno (stderr)) {
- (void) sprintf (buffer, "%d", fileno (fp));
- ! if (!m_putenv (envariable, buffer))
- if (ctx)
- fd_ctx = fileno (fp);
- else
- ***************
- *** 239,242 ****
- fprintf (stderr, "FClose emulating close of %d (%d)\n", d1, d2);
- return i;
- }
- ! #endif OVERHEAD
- --- 246,249 ----
- fprintf (stderr, "FClose emulating close of %d (%d)\n", d1, d2);
- return i;
- }
- ! #endif /* OVERHEAD */
- *** ../mh-6.7.2/sbr/m_getfld.c Mon Jan 27 10:00:52 1992
- --- sbr/m_getfld.c Wed Nov 11 16:50:06 1992
- ***************
- *** 1,7 ****
- /* m_getfld.c - read/parse a message */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: m_getfld.c,v 1.9 1992/01/24 18:03:41 jromine Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include <stdio.h>
- --- 1,7 ----
- /* m_getfld.c - read/parse a message */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: m_getfld.c,v 1.14 1992/10/31 07:44:56 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- ***************
- *** 246,252 ****
- j = bp - sp;
- if ((cnt -= j) <= 0) {
- if (_filbuf(iob) == EOF) {
- ! *cp = *buf = NULL;
- advise (NULLCP, "eof encountered in field \"%s\"",
- name);
- return FMTERR;
- --- 246,252 ----
- j = bp - sp;
- if ((cnt -= j) <= 0) {
- if (_filbuf(iob) == EOF) {
- ! *cp = *buf = 0;
- advise (NULLCP, "eof encountered in field \"%s\"",
- name);
- return FMTERR;
- ***************
- *** 265,277 ****
- * . hit the end of the buffer. (loop)
- */
- if (c == '\n') {
- ! *cp = *buf = NULL;
- advise (NULLCP, "eol encountered in field \"%s\"", name);
- state = FMTERR;
- goto finish;
- }
- if ((i -= j) <= 0) {
- ! *cp = *buf = NULL;
- advise (NULLCP, "field name \"%s\" exceeds %d bytes",
- name, NAMESZ - 1);
- state = LENERR;
- --- 265,277 ----
- * . hit the end of the buffer. (loop)
- */
- if (c == '\n') {
- ! *cp = *buf = 0;
- advise (NULLCP, "eol encountered in field \"%s\"", name);
- state = FMTERR;
- goto finish;
- }
- if ((i -= j) <= 0) {
- ! *cp = *buf = 0;
- advise (NULLCP, "field name \"%s\" exceeds %d bytes",
- name, NAMESZ - 1);
- state = LENERR;
- ***************
- *** 281,287 ****
-
- while (isspace (*--cp) && cp >= name)
- ;
- ! *++cp = NULL;
- /* fall through */
-
- case FLDPLUS:
- --- 281,287 ----
-
- while (isspace (*--cp) && cp >= name)
- ;
- ! *++cp = 0;
- /* fall through */
-
- case FLDPLUS:
- ***************
- *** 329,335 ****
- --i;
- *cp++ = j = *(iob->_ptr + c);
- c = _filbuf(iob);
- ! if (j == '\n' && c != ' ' && c != '\t') {
- if (c != EOF)
- --iob->_ptr, ++iob->_cnt;
- state = FLD;
- --- 329,335 ----
- --i;
- *cp++ = j = *(iob->_ptr + c);
- c = _filbuf(iob);
- ! if ((j == '\0' || j == '\n') && c != ' ' && c != '\t') {
- if (c != EOF)
- --iob->_ptr, ++iob->_cnt;
- state = FLD;
- ***************
- *** 417,423 ****
- adios (NULLCP, "m_getfld() called with bogus state of %d", state);
- }
- finish:;
- ! *cp = NULL;
- msg_count = cp - buf;
- return (state);
- }
- --- 417,423 ----
- adios (NULLCP, "m_getfld() called with bogus state of %d", state);
- }
- finish:;
- ! *cp = 0;
- msg_count = cp - buf;
- return (state);
- }
- ***************
- *** 426,432 ****
-
- #ifdef RPATHS
- static char unixbuf[BUFSIZ] = "";
- ! #endif RPATHS
-
- void
- m_unknown(iob)
- --- 426,432 ----
-
- #ifdef RPATHS
- static char unixbuf[BUFSIZ] = "";
- ! #endif /* RPATHS */
-
- void
- m_unknown(iob)
- ***************
- *** 459,474 ****
- #ifndef RPATHS
- while ((c = getc (iob)) != '\n' && c >= 0)
- ;
- ! #else RPATHS
- cp = unixbuf;
- while ((c = getc (iob)) != '\n')
- *cp++ = c;
- ! *cp = NULL;
- ! #endif RPATHS
- } else {
- /* not a Unix style maildrop */
- (void) fseek (iob, pos, 0);
- ! if (mmdlm2 == NULLCP || *mmdlm2 == NULL)
- mmdlm2 = "\001\001\001\001\n";
- delimstr = mmdlm2;
- msg_style = MS_MMDF;
- --- 459,474 ----
- #ifndef RPATHS
- while ((c = getc (iob)) != '\n' && c >= 0)
- ;
- ! #else /* RPATHS */
- cp = unixbuf;
- while ((c = getc (iob)) != '\n')
- *cp++ = c;
- ! *cp = 0;
- ! #endif /* RPATHS */
- } else {
- /* not a Unix style maildrop */
- (void) fseek (iob, pos, 0);
- ! if (mmdlm2 == NULLCP || *mmdlm2 == 0)
- mmdlm2 = "\001\001\001\001\n";
- delimstr = mmdlm2;
- msg_style = MS_MMDF;
- ***************
- *** 517,523 ****
- } else {
- msg_style = MS_MMDF;
- msg_delim = (char *)fdelim + 1;
- ! fdelimlen = strlen(fdelim);
- delimend = (unsigned char *)(msg_delim + edelimlen);
- }
- }
- --- 517,523 ----
- } else {
- msg_style = MS_MMDF;
- msg_delim = (char *)fdelim + 1;
- ! fdelimlen = strlen((char *)fdelim);
- delimend = (unsigned char *)(msg_delim + edelimlen);
- }
- }
- ***************
- *** 535,545 ****
- char text[10];
- #ifdef RPATHS
- register char *cp;
- ! #endif RPATHS
-
- pos = ftell (iob);
- if ((i = fread (text, sizeof *text, edelimlen, iob)) != edelimlen
- ! || strncmp (text, edelim, edelimlen)) {
- if (i == 0 && msg_style == MS_UUCP)
- /* the final newline in the (brain damaged) unix-format
- * maildrop is part of the delimitter - delete it.
- --- 535,545 ----
- char text[10];
- #ifdef RPATHS
- register char *cp;
- ! #endif /* RPATHS */
-
- pos = ftell (iob);
- if ((i = fread (text, sizeof *text, edelimlen, iob)) != edelimlen
- ! || strncmp (text, (char *)edelim, edelimlen)) {
- if (i == 0 && msg_style == MS_UUCP)
- /* the final newline in the (brain damaged) unix-format
- * maildrop is part of the delimitter - delete it.
- ***************
- *** 546,557 ****
- */
- return 1;
-
- ! #ifdef notdef
- ! (void) fseek (iob, (long)(pos-1), 0);
- ! if (iob->_cnt <= 0)
- ! _filbuf(iob);
- ! #else
- (void) fseek (iob, pos, 0);
- #endif /* !notdef */
- return 0;
- }
- --- 546,556 ----
- */
- return 1;
-
- ! #ifdef notdef
- (void) fseek (iob, pos, 0);
- + #else
- + (void) fseek (iob, (long)(pos-1), 0);
- + (void) getc (iob); /* should be OK */
- #endif /* !notdef */
- return 0;
- }
- ***************
- *** 561,572 ****
- while ((c = getc (iob)) != '\n')
- if (c < 0)
- break;
- ! #else RPATHS
- cp = unixbuf;
- while ((c = getc (iob)) != '\n' && c >= 0)
- *cp++ = c;
- ! *cp = NULL;
- ! #endif RPATHS
- }
-
- return 1;
- --- 560,571 ----
- while ((c = getc (iob)) != '\n')
- if (c < 0)
- break;
- ! #else /* RPATHS */
- cp = unixbuf;
- while ((c = getc (iob)) != '\n' && c >= 0)
- *cp++ = c;
- ! *cp = 0;
- ! #endif /* RPATHS */
- }
-
- return 1;
- ***************
- *** 585,591 ****
- if (cp = dp = index (unixbuf, ' ')) {
- while (cp = index (cp + 1, 'r'))
- if (strncmp (cp, "remote from ", 12) == 0) {
- ! *cp = NULL;
- (void) sprintf (pp, "%s!", cp + 12);
- pp += strlen (pp);
- break;
- --- 584,590 ----
- if (cp = dp = index (unixbuf, ' ')) {
- while (cp = index (cp + 1, 'r'))
- if (strncmp (cp, "remote from ", 12) == 0) {
- ! *cp = 0;
- (void) sprintf (pp, "%s!", cp + 12);
- pp += strlen (pp);
- break;
- ***************
- *** 593,606 ****
- if (cp == NULL)
- cp = unixbuf + strlen (unixbuf);
- if ((cp -= 25) >= dp)
- ! *cp = NULL;
- }
-
- (void) sprintf (pp, "%s\n", unixbuf);
- ! unixbuf[0] = NULL;
- return unixfrom;
- }
- ! #endif RPATHS
-
- /* */
-
- --- 592,605 ----
- if (cp == NULL)
- cp = unixbuf + strlen (unixbuf);
- if ((cp -= 25) >= dp)
- ! *cp = 0;
- }
-
- (void) sprintf (pp, "%s\n", unixbuf);
- ! unixbuf[0] = 0;
- return unixfrom;
- }
- ! #endif /* RPATHS */
-
- /* */
-
- ***************
- *** 700,705 ****
- register int length;
- {
- while (length-- > 0)
- ! *b++ = NULL;
- }
- ! #endif not BSD42
- --- 699,704 ----
- register int length;
- {
- while (length-- > 0)
- ! *b++ = 0;
- }
- ! #endif /* not BSD42 */
- *** ../mh-6.7.2/sbr/m_gmsg.c Tue Mar 20 15:57:39 1990
- --- sbr/m_gmsg.c Tue Oct 20 15:46:31 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* m_gmsg.c - read a folder */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: m_gmsg.c,v 2.10 1992/10/20 22:46:29 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include "../h/local.h"
- ***************
- *** 8,15 ****
- #define NINFO (MAXFOLDER / 5) /* PLEASE be non-trivial... */
- struct info {
- int msgno;
- ! short stats;
- ! char pad[sizeof (int) - sizeof (short)];
- };
-
- static int len=0;
- --- 11,17 ----
- #define NINFO (MAXFOLDER / 5) /* PLEASE be non-trivial... */
- struct info {
- int msgno;
- ! int stats;
- };
-
- static int len=0;
- ***************
- *** 25,31 ****
- #ifdef COMPAT
- register int cur,
- fd;
- ! #endif COMPAT
- register int i,
- j;
- register struct info *rover,
- --- 27,33 ----
- #ifdef COMPAT
- register int cur,
- fd;
- ! #endif /* COMPAT */
- register int i,
- j;
- register struct info *rover,
- ***************
- *** 33,47 ****
- #ifdef COMPAT
- register char *cp;
- char buffer[BUFSIZ];
- ! #endif COMPAT
- register struct msgs *mp;
- #ifdef SYS5DIR
- register struct dirent *dp;
- DIR * dd;
- ! #else SYS5DIR
- register struct direct *dp;
- register DIR * dd;
- ! #endif SYS5DIR
- struct stat st;
-
- if ((dd = opendir (name = m_mailpath (name))) == NULL) {
- --- 35,49 ----
- #ifdef COMPAT
- register char *cp;
- char buffer[BUFSIZ];
- ! #endif /* COMPAT */
- register struct msgs *mp;
- #ifdef SYS5DIR
- register struct dirent *dp;
- DIR * dd;
- ! #else /* SYS5DIR */
- register struct direct *dp;
- register DIR * dd;
- ! #endif /* SYS5DIR */
- struct stat st;
-
- if ((dd = opendir (name = m_mailpath (name))) == NULL) {
- ***************
- *** 50,56 ****
- }
- (void) fstat (dd -> dd_fd, &st);
-
- ! mp = (struct msgs *) malloc (MSIZE (mp, 0, 0));
- if (mp == NULL)
- adios (NULLCP, "unable to allocate folder storage");
- mp -> lowmsg = mp -> hghmsg = mp -> nummsg = 0;
- --- 52,58 ----
- }
- (void) fstat (dd -> dd_fd, &st);
-
- ! mp = (struct msgs *) malloc (MHSIZE (mp, 0, 0));
- if (mp == NULL)
- adios (NULLCP, "unable to allocate folder storage");
- mp -> lowmsg = mp -> hghmsg = mp -> nummsg = 0;
- ***************
- *** 57,68 ****
- mp -> curmsg = 0;
- mp -> lowsel = mp -> hghsel = mp -> numsel = 0;
- mp -> foldpath = name;
- ! mp -> msgflags = NULL;
- if (st.st_uid != getuid () || access (name, 02) == NOTOK)
- mp -> msgflags |= READONLY;
- #ifdef COMPAT
- cur = 0;
- ! #endif COMPAT
- j = strlen (SBACKUP);
- if (head == NULL)
- if ((head = (struct info *)
- --- 59,70 ----
- mp -> curmsg = 0;
- mp -> lowsel = mp -> hghsel = mp -> numsel = 0;
- mp -> foldpath = name;
- ! mp -> msgflags = 0;
- if (st.st_uid != getuid () || access (name, 02) == NOTOK)
- mp -> msgflags |= READONLY;
- #ifdef COMPAT
- cur = 0;
- ! #endif /* COMPAT */
- j = strlen (SBACKUP);
- if (head == NULL)
- if ((head = (struct info *)
- ***************
- *** 91,97 ****
- rover -> stats = EXISTS;
- #ifdef notdef
- rover -> stats &= ~DELETED;
- ! #endif notdef
- rover++;
- }
- else
- --- 93,99 ----
- rover -> stats = EXISTS;
- #ifdef notdef
- rover -> stats &= ~DELETED;
- ! #endif /* notdef */
- rover++;
- }
- else
- ***************
- *** 111,129 ****
- break;
- }
- }
- ! #endif notdef
- continue;
-
- #ifdef MHE
- case '+':
- continue;
- ! #endif MHE
-
- #ifdef UCI
- case '_':
- case '#':
- continue;
- ! #endif UCI
-
- default:
- #ifdef COMPAT
- --- 113,131 ----
- break;
- }
- }
- ! #endif /* notdef */
- continue;
-
- #ifdef MHE
- case '+':
- continue;
- ! #endif /* MHE */
-
- #ifdef UCI
- case '_':
- case '#':
- continue;
- ! #endif /* UCI */
-
- default:
- #ifdef COMPAT
- ***************
- *** 131,137 ****
- cur++;
- continue;
- }
- ! #endif COMPAT
- if (strcmp (dp -> d_name, LINK) == 0
- || strncmp (dp -> d_name, SBACKUP, j) == 0)
- continue;
- --- 133,139 ----
- cur++;
- continue;
- }
- ! #endif /* COMPAT */
- if (strcmp (dp -> d_name, LINK) == 0
- || strncmp (dp -> d_name, SBACKUP, j) == 0)
- continue;
- ***************
- *** 154,160 ****
- if (mp -> curmsg == 0 && cur && (fd = open (current, 0)) != NOTOK) {
- if ((i = read (fd, buffer, sizeof buffer)) > 0) {
- if (cp = index (buffer, '\n'))
- ! *cp = NULL;
- if ((i = m_atoi (buffer)) > 0)
- mp -> curmsg = i;
- }
- --- 156,162 ----
- if (mp -> curmsg == 0 && cur && (fd = open (current, 0)) != NOTOK) {
- if ((i = read (fd, buffer, sizeof buffer)) > 0) {
- if (cp = index (buffer, '\n'))
- ! *cp = 0;
- if ((i = m_atoi (buffer)) > 0)
- mp -> curmsg = i;
- }
- ***************
- *** 164,194 ****
- (void) sprintf (buffer, "%s/%s", name, current);
- (void) unlink (buffer);
- }
- ! #endif COMPAT
-
- #ifndef MTR
- mp -> lowoff = 1;
- ! #else MTR
- mp -> lowoff = mp -> lowmsg;
- ! #endif MTR
- mp -> hghoff = mp -> hghmsg + 1;/* for "new" in m_convert */
-
- mp = (struct msgs *)
- ! realloc ((char *) mp, MSIZE (mp, mp -> lowoff, mp -> hghoff));
- if (mp == NULL)
- adios (NULLCP, "unable to allocate folder storage");
- #ifndef MTR
- for (i = mp -> lowmsg; i <= mp -> hghmsg; i++)
- mp -> msgstats[i] = 0;
- ! #else MTR
- ! mp -> msgstats = (short *)
- ! calloc ((unsigned) 1, MSIZEX (mp, mp -> lowmsg, mp -> hghmsg));
- if (mp -> msgstats == NULL)
- adios (NULLCP, "unable to allocate messages storage");
- mp -> msgstats = (mp -> msgbase = mp -> msgstats) - mp -> lowoff;
- ! if (mp -> msgstats < (short *)0) /* non portable */
- adios (NULLCP, "m_gmsg() botch -- you lose big");
- ! #endif MTR
- for (tail = head; tail < rover; tail++)
- mp -> msgstats[tail -> msgno] = tail -> stats;
- m_getatr (mp);
- --- 166,196 ----
- (void) sprintf (buffer, "%s/%s", name, current);
- (void) unlink (buffer);
- }
- ! #endif /* COMPAT */
-
- #ifndef MTR
- mp -> lowoff = 1;
- ! #else /* MTR */
- mp -> lowoff = mp -> lowmsg;
- ! #endif /* MTR */
- mp -> hghoff = mp -> hghmsg + 1;/* for "new" in m_convert */
-
- mp = (struct msgs *)
- ! realloc ((char *) mp, MHSIZE (mp, mp -> lowoff, mp -> hghoff));
- if (mp == NULL)
- adios (NULLCP, "unable to allocate folder storage");
- #ifndef MTR
- for (i = mp -> lowmsg; i <= mp -> hghmsg; i++)
- mp -> msgstats[i] = 0;
- ! #else /* MTR */
- ! mp -> msgstats = (int *)
- ! calloc ((unsigned) 1, MHSIZEX (mp, mp -> lowmsg, mp -> hghmsg));
- if (mp -> msgstats == NULL)
- adios (NULLCP, "unable to allocate messages storage");
- mp -> msgstats = (mp -> msgbase = mp -> msgstats) - mp -> lowoff;
- ! if (mp -> msgstats < (int *)0) /* non portable */
- adios (NULLCP, "m_gmsg() botch -- you lose big");
- ! #endif /* MTR */
- for (tail = head; tail < rover; tail++)
- mp -> msgstats[tail -> msgno] = tail -> stats;
- m_getatr (mp);
- ***************
- *** 216,226 ****
- bits = FFATTRSLOT;
-
- mp -> msgattrs[i = 0] = getcpy (current);
- ! mp -> msgattrs[++i] = NULL;
- mp -> attrstats = 0; /* initially, all public */
-
- m_getdefs ();
- ! if (mh_seq == NULL || *mh_seq == NULL)
- goto private_only;
-
- (void) sprintf (field, "%s/%s", mp -> foldpath, mh_seq);
- --- 218,228 ----
- bits = FFATTRSLOT;
-
- mp -> msgattrs[i = 0] = getcpy (current);
- ! mp -> msgattrs[++i] = '\0';
- mp -> attrstats = 0; /* initially, all public */
-
- m_getdefs ();
- ! if (mh_seq == '\0' || *mh_seq == '\0')
- goto private_only;
-
- (void) sprintf (field, "%s/%s", mp -> foldpath, mh_seq);
- ***************
- *** 262,268 ****
- && *(np -> n_name + j) == '-'
- && strcmp (mp -> foldpath, np -> n_name + j + 1) == 0) {
- cp = getcpy (np -> n_name + alen);
- ! *(cp + j - alen) = NULL;
- if ((i = m_setatr (mp, cp, getcpy (np -> n_field))) != NOTOK)
- mp -> attrstats |= 1 << (bits + i);/* private */
- }
- --- 264,270 ----
- && *(np -> n_name + j) == '-'
- && strcmp (mp -> foldpath, np -> n_name + j + 1) == 0) {
- cp = getcpy (np -> n_name + alen);
- ! *(cp + j - alen) = '\0';
- if ((i = m_setatr (mp, cp, getcpy (np -> n_field))) != NOTOK)
- mp -> attrstats |= 1 << (bits + i);/* private */
- }
- ***************
- *** 285,290 ****
- --- 287,293 ----
-
- bits = FFATTRSLOT;
- hack = strcmp (current, name) == 0;/* hack... */
- + /* if we're going to use UNSEEN, it should be set here! */
-
- for (i = 0; mp -> msgattrs[i]; i++)
- if (strcmp (mp -> msgattrs[i], name) == 0) {
- ***************
- *** 309,324 ****
- *ap;
- ap++) {
- if (cp = index (*ap, '-'))
- ! *cp++ = NULL;
- if ((j = m_atoi (*ap)) > 0) {
- #ifdef notdef
- if (hack && j >= mp -> lowmsg && j <= mp -> hghmsg
- && (mp -> msgstats[j] & EXISTS))
- mp -> curmsg = j;
- ! #else not notdef
- if (hack)
- mp -> curmsg = j;
- ! #endif not notdef
- for (k = cp ? m_atoi (cp) : j; j <= k; j++)
- if (j >= mp -> lowmsg && j <= mp -> hghmsg
- && (mp -> msgstats[j] & EXISTS))
- --- 312,327 ----
- *ap;
- ap++) {
- if (cp = index (*ap, '-'))
- ! *cp++ = '\0';
- if ((j = m_atoi (*ap)) > 0) {
- #ifdef notdef
- if (hack && j >= mp -> lowmsg && j <= mp -> hghmsg
- && (mp -> msgstats[j] & EXISTS))
- mp -> curmsg = j;
- ! #else /* not notdef */
- if (hack)
- mp -> curmsg = j;
- ! #endif /* not notdef */
- for (k = cp ? m_atoi (cp) : j; j <= k; j++)
- if (j >= mp -> lowmsg && j <= mp -> hghmsg
- && (mp -> msgstats[j] & EXISTS))
- *** ../mh-6.7.2/sbr/m_maildir.c Tue Feb 6 13:08:59 1990
- --- sbr/m_maildir.c Mon Dec 14 16:20:36 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* m_maildir.c - get the path for the mail directory */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: m_maildir.c,v 1.6 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- ***************
- *** 25,31 ****
- if ((cp = exmaildir (folder))
- && (ep = cp + strlen (cp) - 1) > cp
- && *ep == '/')
- ! *ep = NULL;
-
- return cp;
- }
- --- 28,34 ----
- if ((cp = exmaildir (folder))
- && (ep = cp + strlen (cp) - 1) > cp
- && *ep == '/')
- ! *ep = 0;
-
- return cp;
- }
- *** ../mh-6.7.2/sbr/m_msgdef.c Fri Jan 24 10:23:08 1992
- --- sbr/m_msgdef.c Mon Dec 14 16:20:37 1992
- ***************
- *** 1,7 ****
- /* m_msgdef.c - some defines for sbr/m_getfld.c */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: m_msgdef.c,v 1.1 1992/01/24 18:22:58 jromine Exp $";
- ! #endif lint
- #include "../h/mh.h"
-
- int msg_count = 0; /* disgusting hack for "inc" so it can
- --- 1,7 ----
- /* m_msgdef.c - some defines for sbr/m_getfld.c */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: m_msgdef.c,v 1.2 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
- #include "../h/mh.h"
-
- int msg_count = 0; /* disgusting hack for "inc" so it can
- *** ../mh-6.7.2/sbr/m_remsg.c Tue Mar 27 16:49:27 1990
- --- sbr/m_remsg.c Mon Dec 14 16:20:37 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* m_remsg.c - realloc a msgs structure */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: m_remsg.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- ***************
- *** 11,19 ****
- {
- int msgnum;
- #ifdef MTR
- ! register short *sp,
- *pp;
- ! #endif MTR
-
- if (lo == 0 && (lo = mp -> lowmsg) == 0)
- lo = 1;
- --- 14,22 ----
- {
- int msgnum;
- #ifdef MTR
- ! register int *sp,
- *pp;
- ! #endif /* MTR */
-
- if (lo == 0 && (lo = mp -> lowmsg) == 0)
- lo = 1;
- ***************
- *** 25,56 ****
- return mp;
-
- #ifndef MTR
- ! mp = (struct msgs *) realloc ((char *) mp, MSIZE (mp, lo, hi));
- if (mp == NULL)
- adios (NULLCP, "unable to re-allocate folder storage");
- ! #else MTR
- ! if ((sp = (short *) calloc ((unsigned) 1, MSIZEX (mp, lo, hi))) == NULL)
- adios (NULLCP, "unable to re-allocate messages storage");
-
- pp = sp - lo;
- ! if (pp < (short *)0)
- adios (NULLCP, "m_remsg() botch -- you lose big[1]");
- for (msgnum = mp -> lowmsg; msgnum <= mp -> hghmsg; msgnum++)
- pp[msgnum] = mp -> msgstats[msgnum];
- free ((char *) mp -> msgbase);
- mp -> msgstats = sp;
- ! #endif MTR
- mp -> lowoff = lo;
- mp -> hghoff = hi;
- #ifdef MTR
- mp -> msgstats = (mp -> msgbase = mp -> msgstats) - mp -> lowoff;
- ! if (mp -> msgstats < (short *)0)
- adios (NULLCP, "m_remsg() botch -- you lose big[2]");
- ! #endif MTR
- for (msgnum = mp -> lowmsg - 1; msgnum >= lo; msgnum--)
- ! mp -> msgstats[msgnum] = NULL;
- for (msgnum = mp -> hghmsg + 1; msgnum <= hi; msgnum++)
- ! mp -> msgstats[msgnum] = NULL;
-
- return mp;
- }
- --- 28,59 ----
- return mp;
-
- #ifndef MTR
- ! mp = (struct msgs *) realloc ((char *) mp, MHSIZE (mp, lo, hi));
- if (mp == NULL)
- adios (NULLCP, "unable to re-allocate folder storage");
- ! #else /* MTR */
- ! if ((sp = (int *) calloc ((unsigned) 1, MHSIZEX (mp, lo, hi))) == NULL)
- adios (NULLCP, "unable to re-allocate messages storage");
-
- pp = sp - lo;
- ! if (pp < (int *)0)
- adios (NULLCP, "m_remsg() botch -- you lose big[1]");
- for (msgnum = mp -> lowmsg; msgnum <= mp -> hghmsg; msgnum++)
- pp[msgnum] = mp -> msgstats[msgnum];
- free ((char *) mp -> msgbase);
- mp -> msgstats = sp;
- ! #endif /* MTR */
- mp -> lowoff = lo;
- mp -> hghoff = hi;
- #ifdef MTR
- mp -> msgstats = (mp -> msgbase = mp -> msgstats) - mp -> lowoff;
- ! if (mp -> msgstats < (int *)0)
- adios (NULLCP, "m_remsg() botch -- you lose big[2]");
- ! #endif /* MTR */
- for (msgnum = mp -> lowmsg - 1; msgnum >= lo; msgnum--)
- ! mp -> msgstats[msgnum] = 0;
- for (msgnum = mp -> hghmsg + 1; msgnum <= hi; msgnum++)
- ! mp -> msgstats[msgnum] = 0;
-
- return mp;
- }
- *** ../mh-6.7.2/sbr/m_seq.c Thu Feb 14 14:44:50 1991
- --- sbr/m_seq.c Mon Dec 14 16:20:38 1992
- ***************
- *** 1,7 ****
- /* m_seq.c - print out a message sequence */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: m_seq.c,v 1.7 91/02/14 14:44:38 mh Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include <stdio.h>
- --- 1,7 ----
- /* m_seq.c - print out a message sequence */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: m_seq.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- *** ../mh-6.7.2/sbr/m_seqnew.c Thu Feb 14 14:46:38 1991
- --- sbr/m_seqnew.c Mon Dec 14 16:20:39 1992
- ***************
- *** 1,7 ****
- /* m_seqnew.c - manage sequences */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: m_seqnew.c,v 1.5 91/02/14 14:46:26 mh Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include <ctype.h>
- --- 1,7 ----
- /* m_seqnew.c - manage sequences */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: m_seqnew.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include <ctype.h>
- ***************
- *** 147,153 ****
- {
- register char *pp;
-
- ! if (cp == NULL || *cp == NULL) {
- advise (NULLCP, "empty sequence name");
- return 0;
- }
- --- 147,153 ----
- {
- register char *pp;
-
- ! if (cp == NULL || *cp == 0) {
- advise (NULLCP, "empty sequence name");
- return 0;
- }
- ***************
- *** 155,161 ****
- if (strcmp (cp, "new") == 0
- #ifdef notdef
- || strcmp (cp, "cur") == 0
- ! #endif notdef
- || strcmp (cp, "all") == 0
- || strcmp (cp, "first") == 0
- || strcmp (cp, "last") == 0
- --- 155,161 ----
- if (strcmp (cp, "new") == 0
- #ifdef notdef
- || strcmp (cp, "cur") == 0
- ! #endif /* notdef */
- || strcmp (cp, "all") == 0
- || strcmp (cp, "first") == 0
- || strcmp (cp, "last") == 0
- *** ../mh-6.7.2/sbr/m_sync.c Mon Nov 5 11:47:29 1990
- --- sbr/m_sync.c Mon Dec 14 16:20:39 1992
- ***************
- *** 1,7 ****
- /* m_sync.c - synchronize message sequences */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: m_sync.c,v 1.6 90/11/05 11:46:34 mh Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include <stdio.h>
- --- 1,7 ----
- /* m_sync.c - synchronize message sequences */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: m_sync.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- ***************
- *** 8,14 ****
- #include <signal.h>
- #ifndef sigmask
- #define sigmask(s) (1 << ((s) - 1))
- ! #endif not sigmask
-
-
- /* decision logic
- --- 8,14 ----
- #include <signal.h>
- #ifndef sigmask
- #define sigmask(s) (1 << ((s) - 1))
- ! #endif /* not sigmask */
-
-
- /* decision logic
- ***************
- *** 30,38 ****
- register FILE *fp;
- #ifndef BSD42
- TYPESIG (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
- ! #else BSD42
- int smask;
- ! #endif BSD42
-
- if (!(mp -> msgflags & SEQMOD))
- return;
- --- 30,38 ----
- register FILE *fp;
- #ifndef BSD42
- TYPESIG (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
- ! #else /* BSD42 */
- int smask;
- ! #endif /* BSD42 */
-
- if (!(mp -> msgflags & SEQMOD))
- return;
- ***************
- *** 44,50 ****
- fp = NULL;
-
- flags = mp -> msgflags;
- ! if (mh_seq == NULL || *mh_seq == NULL)
- mp -> msgflags |= READONLY;
-
- for (i = 0; mp -> msgattrs[i]; i++) {
- --- 44,50 ----
- fp = NULL;
-
- flags = mp -> msgflags;
- ! if (mh_seq == NULL || *mh_seq == 0)
- mp -> msgflags |= READONLY;
-
- for (i = 0; mp -> msgattrs[i]; i++) {
- ***************
- *** 73,82 ****
- istat = signal (SIGINT, SIG_IGN);
- qstat = signal (SIGQUIT, SIG_IGN);
- tstat = signal (SIGTERM, SIG_IGN);
- ! #else BSD42
- smask = sigblock (sigmask (SIGHUP) | sigmask (SIGINT)
- | sigmask (SIGQUIT) | sigmask (SIGTERM));
- ! #endif BSD42
- }
- fprintf (fp, "%s: %s\n", mp -> msgattrs[i], cp);
- }
- --- 73,82 ----
- istat = signal (SIGINT, SIG_IGN);
- qstat = signal (SIGQUIT, SIG_IGN);
- tstat = signal (SIGTERM, SIG_IGN);
- ! #else /* BSD42 */
- smask = sigblock (sigmask (SIGHUP) | sigmask (SIGINT)
- | sigmask (SIGQUIT) | sigmask (SIGTERM));
- ! #endif /* BSD42 */
- }
- fprintf (fp, "%s: %s\n", mp -> msgattrs[i], cp);
- }
- ***************
- *** 89,97 ****
- (void) signal (SIGINT, istat);
- (void) signal (SIGQUIT, qstat);
- (void) signal (SIGTERM, tstat);
- ! #else BSD42
- (void) sigsetmask (smask);
- ! #endif BSD42
- }
- else
- if (!(mp -> msgflags & READONLY))
- --- 89,97 ----
- (void) signal (SIGINT, istat);
- (void) signal (SIGQUIT, qstat);
- (void) signal (SIGTERM, tstat);
- ! #else /* BSD42 */
- (void) sigsetmask (smask);
- ! #endif /* BSD42 */
- }
- else
- if (!(mp -> msgflags & READONLY))
- *** ../mh-6.7.2/sbr/m_update.c Tue Feb 6 13:09:01 1990
- --- sbr/m_update.c Mon Dec 14 16:20:40 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* m_update.c - update the profile */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: m_update.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
- + #endif lint
-
- #include "../h/mh.h"
- #include <stdio.h>
- ***************
- *** 5,11 ****
- #include <signal.h>
- #ifndef sigmask
- #define sigmask(s) (1 << ((s) - 1))
- ! #endif not sigmask
-
- static int m_chkids();
-
- --- 8,14 ----
- #include <signal.h>
- #ifndef sigmask
- #define sigmask(s) (1 << ((s) - 1))
- ! #endif /* not sigmask */
-
- static int m_chkids();
-
- ***************
- *** 13,21 ****
- int action;
- #ifndef BSD42
- TYPESIG (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
- ! #else BSD42
- int smask;
- ! #endif BSD42
- register struct node *np;
- FILE * out;
-
- --- 16,24 ----
- int action;
- #ifndef BSD42
- TYPESIG (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
- ! #else /* BSD42 */
- int smask;
- ! #endif /* BSD42 */
- register struct node *np;
- FILE * out;
-
- ***************
- *** 31,40 ****
- istat = signal (SIGINT, SIG_IGN);
- qstat = signal (SIGQUIT, SIG_IGN);
- tstat = signal (SIGTERM, SIG_IGN);
- ! #else BSD42
- smask = sigblock (sigmask (SIGHUP) | sigmask (SIGINT)
- | sigmask (SIGQUIT) | sigmask (SIGTERM));
- ! #endif BSD42
-
- if ((out = fopen (ctxpath, "w")) == NULL)
- adios (ctxpath, "unable to write");
- --- 34,43 ----
- istat = signal (SIGINT, SIG_IGN);
- qstat = signal (SIGQUIT, SIG_IGN);
- tstat = signal (SIGTERM, SIG_IGN);
- ! #else /* BSD42 */
- smask = sigblock (sigmask (SIGHUP) | sigmask (SIGINT)
- | sigmask (SIGQUIT) | sigmask (SIGTERM));
- ! #endif /* BSD42 */
-
- if ((out = fopen (ctxpath, "w")) == NULL)
- adios (ctxpath, "unable to write");
- ***************
- *** 48,56 ****
- (void) signal (SIGINT, istat);
- (void) signal (SIGQUIT, qstat);
- (void) signal (SIGTERM, tstat);
- ! #else BSD42
- (void) sigsetmask (smask);
- ! #endif BSD42
- if (action == OK)
- _exit (0); /* we are child, time to die */
- }
- --- 51,59 ----
- (void) signal (SIGINT, istat);
- (void) signal (SIGQUIT, qstat);
- (void) signal (SIGTERM, tstat);
- ! #else /* BSD42 */
- (void) sigsetmask (smask);
- ! #endif /* BSD42 */
- if (action == OK)
- _exit (0); /* we are child, time to die */
- }
- *** ../mh-6.7.2/sbr/makedir.c Thu Jan 23 15:12:50 1992
- --- sbr/makedir.c Mon Dec 14 16:20:40 1992
- ***************
- *** 1,7 ****
- /* makedir.c - make a directory */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: makedir.c,v 1.7 1992/01/23 23:12:43 jromine Exp $";
- ! #endif lint
-
- #if defined (BSD42) || defined (hpux)
- /* Modified to try recursive create. Really, this should be broken
- --- 1,7 ----
- /* makedir.c - make a directory */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: makedir.c,v 1.13 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #if defined (BSD42) || defined (hpux)
- /* Modified to try recursive create. Really, this should be broken
- ***************
- *** 14,28 ****
- #include "../h/mh.h"
- #include <stdio.h>
-
- ! #if defined (BSD42) || defined (hpux)
- #include <errno.h>
- #include <sys/param.h>
- #include <sys/file.h>
- ! #endif BDS42
- #ifdef SYS5DIR
- #include <sys/types.h>
- #include <sys/stat.h>
- ! #endif SYS5DIR
-
- extern int errno;
-
- --- 14,32 ----
- #include "../h/mh.h"
- #include <stdio.h>
-
- ! #if defined (BSD42) || defined (hpux) || defined(SVR4) || \
- ! defined(ncr) || defined (_AIX) || defined(AUX)
- #include <errno.h>
- #include <sys/param.h>
- #include <sys/file.h>
- ! #endif /* BSD42 ... */
- #ifdef SYS5DIR
- #include <sys/types.h>
- #include <sys/stat.h>
- ! #endif /* SYS5DIR */
- ! #if defined(SVR4) || defined(ncr)
- ! #include <unistd.h>
- ! #endif
-
- extern int errno;
-
- ***************
- *** 34,40 ****
- #if defined (BSD42) || defined (hpux) || defined (SYS5DIR)
- register char *c;
- char path[MAXPATHLEN];
- ! #endif BSD42
-
- m_update ();
- (void) fflush (stdout);
- --- 38,44 ----
- #if defined (BSD42) || defined (hpux) || defined (SYS5DIR)
- register char *c;
- char path[MAXPATHLEN];
- ! #endif /* BSD42 */
-
- m_update ();
- (void) fflush (stdout);
- ***************
- *** 64,70 ****
- }
- }
- else
- ! #endif BSD42 or hpux or SYS5DIR
- switch (pid = vfork ()) {
- case NOTOK:
- advise ("fork", "unable to");
- --- 68,74 ----
- }
- }
- else
- ! #endif /* BSD42 or hpux or SYS5DIR */
- switch (pid = vfork ()) {
- case NOTOK:
- advise ("fork", "unable to");
- *** ../mh-6.7.2/sbr/path.c Tue Feb 6 13:09:03 1990
- --- sbr/path.c Mon Dec 14 16:20:41 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* path.c - return a pathname */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: path.c,v 1.6 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- ***************
- *** 27,33 ****
- if ((cp = expath (name, flag))
- && (ep = cp + strlen (cp) - 1) > cp
- && *ep == '/')
- ! *ep = NULL;
-
- return cp;
- }
- --- 30,36 ----
- if ((cp = expath (name, flag))
- && (ep = cp + strlen (cp) - 1) > cp
- && *ep == '/')
- ! *ep = 0;
-
- return cp;
- }
- ***************
- *** 107,115 ****
- for (cp = f; *cp;)
- if (*cp == '/') {
- switch (*++cp) {
- ! case NULL:
- if (--cp > f)
- ! *cp = NULL;
- break;
-
- case '/':
- --- 110,118 ----
- for (cp = f; *cp;)
- if (*cp == '/') {
- switch (*++cp) {
- ! case 0:
- if (--cp > f)
- ! *cp = 0;
- break;
-
- case '/':
- ***************
- *** 122,128 ****
- if (strcmp (cp, DOT) == 0) {
- if (cp > f + 1)
- cp--;
- ! *cp = NULL;
- break;
- }
- if (strcmp (cp, DOTDOT) == 0) {
- --- 125,131 ----
- if (strcmp (cp, DOT) == 0) {
- if (cp > f + 1)
- cp--;
- ! *cp = 0;
- break;
- }
- if (strcmp (cp, DOTDOT) == 0) {
- ***************
- *** 131,137 ****
- break;
- if (cp <= f)
- cp = f + 1;
- ! *cp = NULL;
- break;
- }
- if (strncmp (cp, PWD, NPWD) == 0) {
- --- 134,140 ----
- break;
- if (cp <= f)
- cp = f + 1;
- ! *cp = 0;
- break;
- }
- if (strncmp (cp, PWD, NPWD) == 0) {
- *** ../mh-6.7.2/sbr/pidstatus.c Thu Oct 29 15:00:46 1987
- --- sbr/pidstatus.c Mon Dec 14 16:20:42 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* pidstatus.c - report child's status */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: pidstatus.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include <signal.h>
- ***************
- *** 41,47 ****
- };
- #else
- extern char *sys_siglist[];
- ! #endif BSD42
-
- /* */
-
- --- 44,50 ----
- };
- #else
- extern char *sys_siglist[];
- ! #endif /* BSD42 */
-
- /* */
-
- ***************
- *** 75,86 ****
- fprintf (fp, "Signal %d", signum);
- else
- fprintf (fp, "%s", sigs[signum]);
- ! #else BSD42
- if (signum >= NSIG)
- fprintf (fp, "Signal %d", signum);
- else
- fprintf (fp, "%s", sys_siglist[signum]);
- ! #endif BSD42
- fprintf (fp, "%s\n", status & 0x80 ? " (core dumped)" : "");
- break;
- }
- --- 78,89 ----
- fprintf (fp, "Signal %d", signum);
- else
- fprintf (fp, "%s", sigs[signum]);
- ! #else /* BSD42 */
- if (signum >= NSIG)
- fprintf (fp, "Signal %d", signum);
- else
- fprintf (fp, "%s", sys_siglist[signum]);
- ! #endif /* BSD42 */
- fprintf (fp, "%s\n", status & 0x80 ? " (core dumped)" : "");
- break;
- }
- *** ../mh-6.7.2/sbr/pidwait.c Wed Jan 29 15:57:35 1992
- --- sbr/pidwait.c Mon Dec 14 16:20:42 1992
- ***************
- *** 1,14 ****
- /* pidwait.c - wait for child to exit */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: pidwait.c,v 1.5 1992/01/29 23:57:28 jromine Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include <signal.h>
- #include <stdio.h>
- ! #ifdef BSD42
- #include <sys/wait.h>
- ! #endif BSD42
-
-
- int pidwait (id, sigsok)
- --- 1,14 ----
- /* pidwait.c - wait for child to exit */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: pidwait.c,v 1.10 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include <signal.h>
- #include <stdio.h>
- ! #if defined (BSD42) || defined (SVR4)
- #include <sys/wait.h>
- ! #endif
-
-
- int pidwait (id, sigsok)
- ***************
- *** 17,27 ****
- {
- register int pid;
- TYPESIG (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
- ! #ifndef BSD42
- ! int status;
- ! #else BSD42
- union wait status;
- ! #endif BSD42
-
- if (sigsok == NOTOK) {
- #ifdef notdef /* I don't see why to trap these... */
- --- 17,27 ----
- {
- register int pid;
- TYPESIG (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
- ! #if defined(BSD42) && !defined(WAITINT)
- union wait status;
- ! #else
- ! int status;
- ! #endif
-
- if (sigsok == NOTOK) {
- #ifdef notdef /* I don't see why to trap these... */
- ***************
- *** 32,39 ****
- --- 32,43 ----
- qstat = signal (SIGQUIT, SIG_IGN);
- }
-
- + #ifdef SVR4
- + pid = waitpid (id, &status, WUNTRACED);
- + #else
- while ((pid = wait (&status)) != NOTOK && pid != id)
- continue;
- + #endif
-
- if (sigsok == NOTOK) {
- #ifdef notdef
- ***************
- *** 44,52 ****
- (void) signal (SIGQUIT, qstat);
- }
-
- ! #ifndef BSD42
- ! return (pid == NOTOK ? NOTOK : status);
- ! #else BSD42
- return (pid == NOTOK ? NOTOK : status.w_status);
- ! #endif BSD42
- }
- --- 48,56 ----
- (void) signal (SIGQUIT, qstat);
- }
-
- ! #if defined(BSD42) && !defined(WAITINT)
- return (pid == NOTOK ? NOTOK : status.w_status);
- ! #else
- ! return (pid == NOTOK ? NOTOK : status);
- ! #endif
- }
- *** ../mh-6.7.2/sbr/push.c Thu Oct 29 15:00:47 1987
- --- sbr/push.c Mon Dec 14 16:20:43 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* push.c - push a fork into the background */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: push.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- ***************
- *** 23,29 ****
- (void) signal (SIGTSTP, SIG_IGN);
- (void) signal (SIGTTIN, SIG_IGN);
- (void) signal (SIGTTOU, SIG_IGN);
- ! #endif SIGTSTP
- (void) freopen ("/dev/null", "r", stdin);
- (void) freopen ("/dev/null", "w", stdout);
- break;
- --- 26,32 ----
- (void) signal (SIGTSTP, SIG_IGN);
- (void) signal (SIGTTIN, SIG_IGN);
- (void) signal (SIGTTOU, SIG_IGN);
- ! #endif /* SIGTSTP */
- (void) freopen ("/dev/null", "r", stdin);
- (void) freopen ("/dev/null", "w", stdout);
- break;
- *** ../mh-6.7.2/sbr/putenv.c Tue Feb 6 13:08:42 1990
- --- sbr/putenv.c Mon Dec 14 16:20:43 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* putenv.c - (un) set an envariable */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: putenv.c,v 1.6 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- ***************
- *** 8,14 ****
-
- static nvmatch();
-
- ! int putenv (name, value)
- register char *name,
- *value;
- {
- --- 11,17 ----
-
- static nvmatch();
-
- ! int m_putenv (name, value)
- register char *name,
- *value;
- {
- *** ../mh-6.7.2/sbr/pwd.c Mon Feb 5 14:38:32 1990
- --- sbr/pwd.c Mon Dec 14 16:20:44 1992
- ***************
- *** 1,9 ****
- /* pwd.c - return the current working directory */
-
- #include "../h/mh.h"
- #if !defined (BSD42) && !defined (SYS5DIR)
- #include "../h/local.h"
- ! #endif not BSD42 and not SYS5DIR
- #include <stdio.h>
-
- #define MAXPATHLEN 1024
- --- 1,12 ----
- /* pwd.c - return the current working directory */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: pwd.c,v 2.5 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #if !defined (BSD42) && !defined (SYS5DIR)
- #include "../h/local.h"
- ! #endif /* not BSD42 and not SYS5DIR */
- #include <stdio.h>
-
- #define MAXPATHLEN 1024
- ***************
- *** 19,34 ****
- #ifndef SYS5DIR
- if (getwd (curwd) == NOTOK) {
- admonish (NULL, "unable to determine working directory");
- ! #else SYS5DIR
- if (getcwd (curwd, MAXPATHLEN) == NULL) {
- admonish (NULL, "unable to determine working directory");
- ! #endif SYS5DIR
- ! #else BSD42
- ! if (getwd (curwd) == NULL) {
- admonish (NULLCP, "unable to determine working directory: %s", curwd);
- ! #endif BSD42
- if (mypath == NULL
- ! || *mypath == NULL
- || ((void) strcpy (curwd, mypath), chdir (curwd)) == NOTOK) {
- (void) strcpy (curwd, "/");
- (void) chdir (curwd);
- --- 22,37 ----
- #ifndef SYS5DIR
- if (getwd (curwd) == NOTOK) {
- admonish (NULL, "unable to determine working directory");
- ! #else /* SYS5DIR */
- if (getcwd (curwd, MAXPATHLEN) == NULL) {
- admonish (NULL, "unable to determine working directory");
- ! #endif /* SYS5DIR */
- ! #else /* BSD42 */
- ! if (getwd (curwd) == 0) {
- admonish (NULLCP, "unable to determine working directory: %s", curwd);
- ! #endif /* BSD42 */
- if (mypath == NULL
- ! || *mypath == 0
- || ((void) strcpy (curwd, mypath), chdir (curwd)) == NOTOK) {
- (void) strcpy (curwd, "/");
- (void) chdir (curwd);
- ***************
- *** 37,43 ****
- }
-
- if ((cp = curwd + strlen (curwd) - 1) > curwd && *cp == '/')
- ! *cp = NULL;
-
- return curwd;
- }
- --- 40,46 ----
- }
-
- if ((cp = curwd + strlen (curwd) - 1) > curwd && *cp == '/')
- ! *cp = 0;
-
- return curwd;
- }
- ***************
- *** 120,123 ****
- closedir (dd);
- return NOTOK;
- }
- ! #endif not BSD42 and not SYS5DIR
- --- 123,126 ----
- closedir (dd);
- return NOTOK;
- }
- ! #endif /* not BSD42 and not SYS5DIR */
- *** ../mh-6.7.2/sbr/refile.c Thu Oct 29 15:00:49 1987
- --- sbr/refile.c Mon Dec 14 16:20:44 1992
- ***************
- *** 1,6 ****
- /* refile.c - refile the draft into another folder */
-
- -
- #include "../h/mh.h"
- #include <stdio.h>
-
- --- 1,8 ----
- /* refile.c - refile the draft into another folder */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: refile.c,v 1.2 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
-
- ***************
- *** 14,19 ****
- --- 16,23 ----
-
- vecp = 0;
- vec[vecp++] = r1bindex (fileproc, '/');
- + vec[vecp++] = "-nolink"; /* override bad .mh_profile defaults */
- + vec[vecp++] = "-nopreserve";
- vec[vecp++] = "-file";
- vec[vecp++] = file;
-
- *** ../mh-6.7.2/sbr/remdir.c Mon Feb 5 14:39:43 1990
- --- sbr/remdir.c Mon Dec 14 16:20:45 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* remdir.c - remove a directory */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: remdir.c,v 1.5 1992/12/15 00:20:22 jromine Exp $";
- + #endif lint
-
- #include "../h/mh.h"
- #include <stdio.h>
- ***************
- *** 9,15 ****
- {
- #if !defined (BSD42) && !defined (SYS5DIR)
- int pid;
- ! #endif not BSD42 and not SYS5DIR
-
- m_update ();
- (void) fflush (stdout);
- --- 12,18 ----
- {
- #if !defined (BSD42) && !defined (SYS5DIR)
- int pid;
- ! #endif /* not BSD42 and not SYS5DIR */
-
- m_update ();
- (void) fflush (stdout);
- ***************
- *** 32,43 ****
- return 0;
- break;
- }
- ! #else BSD42 or SYS5DIR
- if (rmdir (dir) == NOTOK) {
- admonish (dir, "unable to remove directory");
- return 0;
- }
- ! #endif BSD42 or SYS5DIR
-
- return 1;
- }
- --- 35,46 ----
- return 0;
- break;
- }
- ! #else /* BSD42 or SYS5DIR */
- if (rmdir (dir) == NOTOK) {
- admonish (dir, "unable to remove directory");
- return 0;
- }
- ! #endif /* BSD42 or SYS5DIR */
-
- return 1;
- }
- *** ../mh-6.7.2/sbr/smatch.c Fri Feb 9 09:33:51 1990
- --- sbr/smatch.c Mon Dec 14 16:20:46 1992
- ***************
- *** 1,10 ****
- /* smatch.c - match a switch */
-
- #include "../h/mh.h"
-
- !
- #define abs(i) (i < 0 ? -i : i)
- !
-
- smatch(string, swp)
- register char *string;
- --- 1,13 ----
- /* smatch.c - match a switch */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: smatch.c,v 1.5 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
-
- ! #ifndef abs
- #define abs(i) (i < 0 ? -i : i)
- ! #endif
-
- smatch(string, swp)
- register char *string;
- *** ../mh-6.7.2/sbr/sprintb.c Thu Oct 29 15:00:50 1987
- --- sbr/sprintb.c Mon Dec 14 16:20:46 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* sprintb.c - sprintf a %b string */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: sprintb.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- ***************
- *** 31,37 ****
- for (; *bits > 32; bits++)
- continue;
- *bp++ = '>';
- ! *bp = NULL;
- }
-
- return buffer;
- --- 34,40 ----
- for (; *bits > 32; bits++)
- continue;
- *bp++ = '>';
- ! *bp = 0;
- }
-
- return buffer;
- *** ../mh-6.7.2/sbr/strindex.c Thu Jan 23 15:13:41 1992
- --- sbr/strindex.c Mon Dec 14 16:20:47 1992
- ***************
- *** 1,7 ****
- /* strindex.c - "unsigned" lexical index */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: strindex.c,v 2.2 1990/04/05 15:30:30 sources Exp $";
- ! #endif lint
-
-
- int stringdex (p1, p2)
- --- 1,7 ----
- /* strindex.c - "unsigned" lexical index */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: strindex.c,v 2.3 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
-
- int stringdex (p1, p2)
- *** ../mh-6.7.2/sbr/trimcpy.c Thu Oct 29 15:00:51 1987
- --- sbr/trimcpy.c Mon Dec 14 16:20:47 1992
- ***************
- *** 1,5 ****
- --- 1,9 ----
- /* trimcpy.c - strip [lt]wsp and replace newlines with spaces */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: trimcpy.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- +
- #include "../h/mh.h"
- #include <ctype.h>
- #include <stdio.h>
- ***************
- *** 14,20 ****
- cp++;
- for (sp = cp + strlen (cp) - 1; sp >= cp; sp--)
- if (isspace (*sp))
- ! *sp = NULL;
- else
- break;
- for (sp = cp; *sp; sp++)
- --- 18,24 ----
- cp++;
- for (sp = cp + strlen (cp) - 1; sp >= cp; sp--)
- if (isspace (*sp))
- ! *sp = 0;
- else
- break;
- for (sp = cp; *sp; sp++)
- *** ../mh-6.7.2/sbr/uleq.c Mon Apr 2 15:07:21 1990
- --- sbr/uleq.c Mon Dec 14 16:20:48 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* uleq.c - "unsigned" lexical compare */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: uleq.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #define TO_LOWER 040
- #define NO_MASK 000
- ***************
- *** 18,25 ****
- --- 21,36 ----
-
- while (c = *c1++)
- {
- + #ifdef LOCALE
- + c &= 0xff;
- + mask = *c2 & 0xff;
- + c = (isalpha(c) && isupper(c)) ? tolower(c) : c;
- + mask = (isalpha(mask) && isupper(mask)) ? tolower(mask) : mask;
- + if (c != mask)
- + #else
- mask = (isalpha(c) && isalpha(*c2)) ? TO_LOWER : NO_MASK;
- if ((c | mask) != (*c2 | mask))
- + #endif
- return 0;
- else
- c2++;
- *** ../mh-6.7.2/sbr/uprf.c Mon Apr 2 15:07:24 1990
- --- sbr/uprf.c Mon Dec 14 16:20:48 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* uprf.c - "unsigned" lexical prefix */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: uprf.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #define TO_LOWER 040
- #define NO_MASK 000
- ***************
- *** 16,23 ****
- --- 19,34 ----
-
- while (c = *c2++)
- {
- + #ifdef LOCALE
- + c &= 0xff;
- + mask = *c1 & 0xff;
- + c = (isalpha(c) && isupper(c)) ? tolower(c) : c;
- + mask = (isalpha(mask) && isupper(mask)) ? tolower(mask) : mask;
- + if (c != mask)
- + #else
- mask = (isalpha(c) && isalpha(*c1)) ? TO_LOWER : NO_MASK;
- if ((c | mask) != (*c1 | mask))
- + #endif
- return 0;
- else
- c1++;
- *** ../mh-6.7.2/sbr/vfgets.c Thu Oct 29 15:00:53 1987
- --- sbr/vfgets.c Mon Dec 14 16:20:49 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* vfgets.c - virtual fgets */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: vfgets.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- ***************
- *** 52,58 ****
- if (toggle)
- goto wrong_guess;
- if (*++dp == '\n')
- ! *--dp = NULL, cp = dp;
- else
- cp = ++dp;
- }
- --- 55,61 ----
- if (toggle)
- goto wrong_guess;
- if (*++dp == '\n')
- ! *--dp = 0, cp = dp;
- else
- cp = ++dp;
- }
- *** ../mh-6.7.2/support/bboards/bbaka.c Tue Mar 20 16:23:49 1990
- --- support/bboards/bbaka.c Mon Dec 14 16:20:50 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* bbaka.c - generate an alias list for BBoards */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: bbaka.c,v 2.4 1992/12/15 00:20:22 jromine Exp $";
- + #endif lint
-
- #include "../h/strings.h"
- #include "../zotnet/bboards.h"
- ***************
- *** 49,57 ****
- if (systemn) {
- #ifndef MHMTS
- (void) sprintf (bbaddr, "%s@bboards", bb -> bb_name, LocalName ());
- ! #else MHMTS
- (void) strcpy (bbaddr, BBOARDS);
- ! #endif MHMTS
-
- if (strcmp (bb -> bb_name, bb -> bb_addr) == 0)
- aka (bb -> bb_name, bbaddr);
- --- 52,60 ----
- if (systemn) {
- #ifndef MHMTS
- (void) sprintf (bbaddr, "%s@bboards", bb -> bb_name, LocalName ());
- ! #else /* MHMTS */
- (void) strcpy (bbaddr, BBOARDS);
- ! #endif /* MHMTS */
-
- if (strcmp (bb -> bb_name, bb -> bb_addr) == 0)
- aka (bb -> bb_name, bbaddr);
- ***************
- *** 113,119 ****
- {
- #ifndef MHMTS
- printf ("%s: %s\n", field, value);
- ! #else MHMTS
- printf ("%s%s %s\n", field, systemn ? ":" : ";", value);
- ! #endif MHMTS
- }
- --- 116,122 ----
- {
- #ifndef MHMTS
- printf ("%s: %s\n", field, value);
- ! #else /* MHMTS */
- printf ("%s%s %s\n", field, systemn ? ":" : ";", value);
- ! #endif /* MHMTS */
- }
- *** ../mh-6.7.2/support/bboards/bbexp.c Tue Mar 20 16:25:11 1990
- --- support/bboards/bbexp.c Mon Dec 14 16:20:50 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* bbexp.c - expunge the BBoards area */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: bbexp.c,v 1.6 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include "../h/dropsbr.h"
- ***************
- *** 21,27 ****
- --- 24,34 ----
- int pipeser ();
-
-
- + #ifndef __STDC__
- + #ifdef SYS5
- struct passwd *getpwnam ();
- + #endif
- + #endif
-
- /* */
-
- ***************
- *** 137,143 ****
- fprintf (pf, "packf all -file %s\n", tmpfil);
- #ifdef notdef /* want real EOF to end it */
- fprintf (pf, "quit\n");
- ! #endif notdef
- if (td = pclose (pf))
- advise (NULLCP, "msh returns %d", td);
- (void) signal (SIGPIPE, SIG_DFL);
- --- 144,150 ----
- fprintf (pf, "packf all -file %s\n", tmpfil);
- #ifdef notdef /* want real EOF to end it */
- fprintf (pf, "quit\n");
- ! #endif /* notdef */
- if (td = pclose (pf))
- advise (NULLCP, "msh returns %d", td);
- (void) signal (SIGPIPE, SIG_DFL);
- ***************
- *** 225,231 ****
- {
- #ifndef BSD42
- (void) signal (SIGPIPE, pipeser);
- ! #endif not BSD42
-
- if (!broken_pipe++)
- advise (NULLCP, "broken pipe");
- --- 232,238 ----
- {
- #ifndef BSD42
- (void) signal (SIGPIPE, pipeser);
- ! #endif /* not BSD42 */
-
- if (!broken_pipe++)
- advise (NULLCP, "broken pipe");
- *** ../mh-6.7.2/support/bboards/bbtar.c Tue Mar 20 16:25:36 1990
- --- support/bboards/bbtar.c Mon Dec 14 16:20:51 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* bbtar.c - generate the names of archive files to be put to tape */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: bbtar.c,v 1.6 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- /* Usage:
-
- ***************
- *** 27,33 ****
- --- 30,40 ----
-
- static process();
-
- + #ifndef __STDC__
- + #ifdef SYS5
- struct passwd *getpwnam ();
- + #endif
- + #endif
-
- /* */
-
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- support/general/bootmhn.findit Mon Nov 2 13:59:33 1992
- ***************
- *** 0 ****
- --- 1,26 ----
- + : run this script through /bin/sh
- + : '$Id: bootmhn.findit,v 1.2 1992/11/02 21:58:59 jromine Exp $'
- +
- + if [ -z "$1" -o -z "$2" ]; then
- + echo "usage: bootmhn.findit program library" 1>&2
- + exit 1
- + fi
- +
- + PGM= DIR= oIFS="$IFS" IFS=":"
- + for A in $PATH $2 /usr/demo/SOUND; do
- + if [ "$A" = "." ]; then
- + continue
- + fi
- + if [ -f "$A/$1" ]; then
- + if [ "$A" = "/usr/local/bin" ]; then
- + PGM="$1" DIR=""
- + else
- + PGM="$A/$1" DIR="$A/"
- + fi
- +
- + echo "$PGM"
- + exit 0
- + fi
- + done
- + IFS="$oIFS"
- +
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- support/general/bootmhn.sh Mon Nov 16 14:32:51 1992
- ***************
- *** 0 ****
- --- 1,150 ----
- + : run this script through /bin/sh
- + : '$Id'
- +
- + if [ -z "$1" ]; then
- + echo "usage: bootmhn.sh MH-library-area" 1>&2
- + exit 1
- + fi
- + LIB="$1"
- + MHN="$LIB/mhn_defaults"
- +
- + if [ -s $MHN ]; then
- + echo "%s: already exists." 1>&2
- + exit 1
- + fi
- + TMP=/tmp/mhn$$
- + trap "rm -f $TMP" 0 1 2 3 13 15
- +
- + echo "mhn-store-text: %m%P.txt" >> $TMP
- + echo "mhn-store-application/PostScript: %m%P.ps" >> $TMP
- +
- + PGM="`./bootmhn.findit xwud $LIB`"
- + if [ ! -z "$PGM" ]; then
- + XWUD="$PGM" X11DIR="`echo $PGM | awk -F/ '{ for(i=2;i<NF;i++)printf "/%s", $i;}'`"/
- + else
- + XWUD= X11DIR=
- + fi
- +
- + PGM="`./bootmhn.findit pbmtoxwd $LIB`"
- + if [ ! -z "$PGM" ]; then
- + PBM="$PGM" PBMDIR="`echo $PGM | awk -F/ '{ for(i=2;i<NF;i++)printf "/%s", $i;}'`"/
- + else
- + PBM= PBMDIR=
- + fi
- +
- + PGM="`./bootmhn.findit xv $LIB`"
- + if [ ! -z "$PGM" ]; then
- + echo "\
- + mhn-show-image: %p$PGM -geometry =-0+0 '%f'" >> $TMP
- + elif [ ! -z $"PBM" -a ! -z "$XWUD" ]; then
- + echo "\
- + mhn-show-image/gif: %p${PBMDIR}giftoppm | ${PBMDIR}ppmtopgm | ${PBMDIR}pgmtopbm | ${PBMDIR}pbmtoxwd | $XWUD -geometry =-0+0
- + mhn-show-image/x-pbm: %p${PBMDIR}pbmtoxwd | $XWUD -geometry =-0+0
- + mhn-show-image/x-pgm: %p${PBMDIR}pgmtopbm | ${PBMDIR}pbmtoxwd | $XWUD -geometry =-0+0
- + mhn-show-image/x-ppm: %p${PBMDIR}ppmtopgm | ${PBMDIR}pgmtopbm | ${PBMDIR}pbmtoxwd | $XWUD -geometry =-0+0
- + mhn-show-image/x-xwd: %p$XWUD -geometry =-0+0" >> $TMP
- +
- + PGM="`./bootmhn.findit djpeg $LIB`"
- + if [ ! -z "$PGM" ]; then
- + echo "\
- + mhn-show-image/jpeg: %p$PGM -Pg | ${PBMDIR}ppmtopgm | ${PBMDIR}pgmtopbm | ${PBMDIR}pbmtoxwd | $XWUD -geometry =-0+0" >> $TMP
- + fi
- + fi
- +
- + if [ -f "/dev/audioIU" ]; then
- + PGM="`./bootmhn.findit recorder $LIB`"
- + if [ ! -z "$PGM" ]; then
- + echo "\
- + mhn-store-audio/basic: %m%P.au
- + mhn-compose-audio/basic: ${AUDIODIR}recorder '%f' -au -pause > /dev/tty
- + mhn-show-audio/basic: %p${AUDIODIR}splayer -au" >> $TMP
- + fi
- + elif [ -f "/dev/audio" ]; then
- + PGM="`./bootmhn.findit raw2audio $LIB`"
- + if [ ! -z "$PGM" ]; then
- + AUDIODIR="`echo $PGM | awk -F/ '{ for(i=2;i<NF;i++)printf "/%s", $i;}'`"/
- + echo "\
- + mhn-store-audio/basic: | ${AUDIODIR}raw2audio -e ulaw -s 8000 -c 1 > %m%P.au
- + mhn-store-audio/x-next: %m%P.au" >> $TMP
- + echo "\
- + mhn-compose-audio/basic: ${AUDIODIR}record | ${AUDIODIR}raw2audio -F
- + mhn-show-audio/basic: %p${AUDIODIR}raw2audio 2>/dev/null | play" >> $TMP
- +
- + PGM="`./bootmhn.findit adpcm_enc $LIB`"
- + if [ ! -z "$PGM" ]; then
- + DIR="`echo $PGM | awk -F/ '{ for(i=2;i<NF;i++)printf "/%s", $i;}'`"/
- + echo "\
- + mhn-compose-audio/x-next: ${AUDIODIR}record | ${DIR}adpcm_enc
- + mhn-show-audio/x-next: %p${DIR}adpcm_dec | ${AUDIODIR}play" >> $TMP
- + else
- + echo "\
- + mhn-compose-audio/x-next: ${AUDIODIR}record
- + mhn-show-audio/x-next: %p${AUDIODIR}play" >> $TMP
- + fi
- + else
- + echo "\
- + mhn-compose-audio/basic: cat < /dev/audio
- + mhn-show-audio/basic: %pcat > /dev/audio" >> $TMP
- + fi
- + fi
- +
- + PGM="`./bootmhn.findit lpr $LIB`"
- + if [ ! -z "$PGM" ]; then
- + echo "\
- + mhn-show-application/PostScript: %plpr -Pps" >> $TMP
- + else
- + PGM="`./bootmhn.findit lp $LIB`"
- + if [ ! -z "$PGM" ]; then
- + echo "\
- + mhn-show-application/PostScript: %plp -dps" >> $TMP
- + fi
- + fi
- +
- + PGM="`./bootmhn.findit ivs_replay $LIB`"
- + if [ ! -z "$PGM" ]; then
- + echo "\
- + mhn-show-application/x-ivs: %p$PGM -o '%F'" >> $TMP
- + fi
- +
- + PGM="`./bootmhn.findit richtext $LIB`"
- + if [ ! -z "$PGM" ]; then
- + echo "\
- + mhn-show-text/richtext: %p$PGM -p '%F'" >> $TMP
- + else
- + PGM="`./bootmhn.findit rt2raw $LIB`"
- + if [ ! -z "$PGM" ]; then
- + echo "\
- + mhn-show-text/richtext: %p$PGM < '%f' | fmt -78 | more" >> $TMP
- + fi
- + fi
- +
- + PGM="`./bootmhn.findit xterm $LIB`"
- + if [ ! -z "$PGM" ]; then
- + echo "\
- + mhn-charset-iso-8859-1: xterm -fn '-*-*-medium-r-normal-*-*-120-*-*-c-*-iso8859-*' -e %s" >> $TMP
- + fi
- +
- + sort < $TMP > $MHN
- + chmod 644 $MHN
- +
- + exit 0
- +
- + : not until we get a "safe" postscript environment...
- +
- + PGM="`./bootmhn.findit pageview $LIB`"
- + if [ "$DISPLAY" = "unix:0.0" -a ! -z "$PGM" ]; then
- + echo "mhn-show-application/PostScript: %p$PGM -" >> $TMP
- + else
- + PGM="`./bootmhn.findit gs $LIB`"
- + if [ ! -z "$PGM" ]; then
- + echo "mhn-show-application/PostScript: %p$PGM -- '%F'" >> $TMP
- + fi
- + fi
- +
- + : have to experiment more with this
- +
- + PGM="`./bootmhn.findit ivs_record $LIB`"
- + if [ ! -z "$PGM" ]; then
- + echo "\
- + mhn-compose-application/x-ivs: $PGM -u localhost '%F'" >> $TMP
- + fi
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- support/general/mhl.headers Tue Oct 20 15:48:44 1992
- ***************
- *** 0 ****
- --- 1,12 ----
- + overflowtext="***",overflowoffset=5
- + leftadjust,compwidth=9
- + ignores=msgid,message-id,received,content-type,content-transfer-encoding,content-ID
- + Date:formatfield="%<(nodate{text})%{text}%|%(pretty{text})%>"
- + To:
- + cc:
- + :
- + From:
- + Subject:
- + :
- + extras:nocomponent
- + :
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- support/general/packmbox.sh Fri Feb 14 09:05:43 1992
- ***************
- *** 0 ****
- --- 1,40 ----
- + #! /bin/sh
- + # packmbox - pack an MH folder back into a UUCP-style mbox
- + # @(#)$Id: packmbox.sh,v 1.16 1992/02/14 17:05:31 jromine Exp $
- + #
- + # Defaults:
- + # `+folder' defaults to current folder
- + # `msgs' defaults to all
- + #
- + # Context:
- + # Current-Folder
- + #
- + # for simplicity (and speed) we don't parse command-line args (much)
- + case $#/$1 in
- + 1/-h*) echo "syntax: packmbox [+folder] [msgs] [-help]" 1>&2; exit 0;;
- + esac
- +
- + format="%(msg) From \
- + %<{return-path}%(putstr)%|\
- + %<(nonnull(mbox{from}))%(putstr)%|nobody%>@\
- + %<(nonnull(host{from}))%(putstr)%|nowhere%>%> \
- + %(day{date}) %(month{date}) %2(mday{date}) \
- + %02(hour{date}):%02(min{date}):%02(sec{date}) \
- + %(void(year{date}))%<(gt 100)%4(putnum)%|19%02(putnum)%>"
- +
- + trap 'rm -f /tmp/packm$$; exit 1' 1 2 3 15
- +
- + scan -noclear -noheader -noreverse -width 256 \
- + -format "${format}" $* >/tmp/packm$$
- + # tricky -- you must do this "cd" after scan has updated the context
- + cd `mhpath`
- +
- + exec </tmp/packm$$
- + rm -f /tmp/packm$$
- + while read m f
- + do
- + echo "$f"
- + sed -e '/^From /s/^/>/' < $m
- + echo ""
- + done
- + exit
- *** ../mh-6.7.2/support/general/replcomps Thu Apr 5 16:05:55 1990
- --- support/general/replcomps Sun Feb 9 14:03:19 1992
- ***************
- *** 1,2 ****
- ! %(lit)%(formataddr %<{reply-to}%|%<{from}%|%<{sender}%|%<{return-path}%>%>%>%>)\
- %<(nonnull)%(void(width))%(putaddr To: )\n%>\
- --- 1,2 ----
- ! %(lit)%(formataddr %<{reply-to}%?{from}%?{sender}%?{return-path}%>)\
- %<(nonnull)%(void(width))%(putaddr To: )\n%>\
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- support/general/scan.default Mon Feb 10 21:11:21 1992
- ***************
- *** 0 ****
- --- 1,7 ----
- + %; NOTE: This file is supplied for reference only; it shows the default
- + %; format string (for non-UK sites) which was compiled into "scan".
- + %; See the source file "h/scansbr.h" for details.
- + %4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
- + %02(mon{date})/%02(mday{date})%<{date} %|*%>\
- + %<(mymbox{from})%<{to}To:%14(friendly{to})%>%>%<(zero)%17(friendly{from})%> \
- + %{subject}%<{body}<<%{body}>>%>
- *** ../mh-6.7.2/support/general/scan.mailx Mon Dec 10 11:55:18 1990
- --- support/general/scan.mailx Mon Oct 26 08:44:55 1992
- ***************
- *** 2,6 ****
- %<{status} %|N%>\
- ! %<{replied}R%|%<{encrypted}E%| %>%>\
- %4(msg)\
- ! %<(mymbox{from})To: %13(friendly{to})%|%17(friendly{from})%>\
- %3(day{date}) %3(month{date}) %02(mday{date})\
- --- 2,6 ----
- %<{status} %|N%>\
- ! %<{replied}R%?{encrypted}E%| %>\
- %4(msg)\
- ! %<(mymbox{from})%<{to}To: %13(friendly{to})%>%>%<(zero)%17(friendly{from})%>\
- %3(day{date}) %3(month{date}) %02(mday{date})\
- *** ../mh-6.7.2/support/general/scan.size Mon Dec 10 11:55:18 1990
- --- support/general/scan.size Mon Oct 26 08:44:57 1992
- ***************
- *** 1,2 ****
- ! %4(msg)%<(cur)+%| %>%<{replied}-%|%<{encrypted}E%| %>%>\
- %02(mon{date})/%02(mday{date})%<{date} %|*%>\
- --- 1,2 ----
- ! %4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
- %02(mon{date})/%02(mday{date})%<{date} %|*%>\
- ***************
- *** 3,5 ****
- %5(size) \
- ! %<(mymbox{from})To:%14(friendly{to})%|%17(friendly{from})%> \
- %{subject}%<{body}<<%{body}%>
- --- 3,5 ----
- %5(size) \
- ! %<(mymbox{from})%<{to}To:%14(friendly{to})%>%>%<(zero)%17(friendly{from})%> \
- %{subject}%<{body}<<%{body}%>
- *** ../mh-6.7.2/support/general/scan.time Mon Dec 10 11:55:18 1990
- --- support/general/scan.time Mon Oct 26 08:44:56 1992
- ***************
- *** 1,2 ****
- ! %4(msg)%<(cur)+%| %>%<{replied}-%|%<{encrypted}E%| %>%>\
- %02(mon{date})/%02(mday{date}) \
- --- 1,2 ----
- ! %4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
- %02(mon{date})/%02(mday{date}) \
- ***************
- *** 4,6 ****
- %<{date} %|*%>\
- ! %<(mymbox{from})To:%14(friendly{to})%|%17(friendly{from})%> \
- %{subject}%<{body}<<%{body}%>
- --- 4,6 ----
- %<{date} %|*%>\
- ! %<(mymbox{from})%<{to}To:%14(friendly{to})%>%>%<(zero)%17(friendly{from})%> \
- %{subject}%<{body}<<%{body}%>
- *** ../mh-6.7.2/support/general/scan.timely Mon Dec 10 11:55:18 1990
- --- support/general/scan.timely Mon Oct 26 08:44:58 1992
- ***************
- *** 1,9 ****
- ! %4(msg)%<(cur)+%| %>%<{replied}-%|%<{encrypted}E%| %>%>\
- %(void(rclock{date}))\
- ! %<(gt 15768000)%03(month{date})%02(year{date})%|\
- ! %<(gt 604800)%02(mday{date})%03(month{date})%|\
- ! %<(gt 86400) %(day{date}) %|\
- ! %02(hour{date}):%02(min{date})%>%>%>\
- %<{date} %|*%>\
- ! %<(mymbox{from})To:%14(friendly{to})%|%17(friendly{from})%> \
- %{subject}%<{body}<<%{body}%>
- --- 1,9 ----
- ! %4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
- %(void(rclock{date}))\
- ! %<(gt 15768000)%03(month{date})%(void(year{date}))%02(modulo 100)\
- ! %?(gt 604800)%02(mday{date})%03(month{date})\
- ! %?(gt 86400) %(day{date}) %|\
- ! %02(hour{date}):%02(min{date})%>\
- %<{date} %|*%>\
- ! %<(mymbox{from})%<{to}To:%14(friendly{to})%>%>%<(zero)%17(friendly{from})%> \
- %{subject}%<{body}<<%{body}%>
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- support/general/viamail.sh Fri Oct 16 10:15:06 1992
- ***************
- *** 0 ****
- --- 1,34 ----
- + : run this script through /bin/sh
- + : '@(#)$Id: viamail.sh,v 1.2 1992/10/16 17:15:00 jromine Exp $'
- +
- + DELAY=0 FROM=
- + case "$1" in
- + -*) DELAY="`echo $1 | sed -e 's%-%%'`"
- + shift
- + ;;
- + esac
- + if [ ! -z "$PERSON" ]; then
- + FROM="-viafrom $PERSON"
- + fi
- +
- + if [ $# -lt 3 ]; then
- + echo 'usage: viamail: "mailpath" "subject-string" directory-or-file ...' 1>&2
- + exit 1;
- + fi
- +
- + mailpath="$1"
- + echo "mailpath = $mailpath" 1>&2
- + shift
- +
- + subject="$1"
- + echo "subject-string = $subject" 1>&2
- + shift
- +
- + echo "files = $*" 1>&2
- +
- + tar cvf - $* | compress | \
- + mhn -viamail "$mailpath" -viasubj "$subject" \
- + -viaparm "type=tar; conversions=x-compress" \
- + -viacmnt "extract with uncompress | tar xvpf -" \
- + -viadelay "$DELAY" \
- + -verbose $FROM
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- support/pop/pop-more.txt Mon Oct 26 08:46:41 1992
- ***************
- *** 0 ****
- --- 1,590 ----
- +
- +
- +
- +
- + draft POP Version 3: More Service Offerings Apr 92
- +
- +
- + Post Office Protocol: Version 3
- + More Service Offerings
- +
- + Fri Apr 17 21:03:20 1992
- +
- +
- + Marshall T. Rose
- + Dover Beach Consulting, Inc.
- + mrose@dbc.mtview.ca.us
- +
- +
- +
- +
- +
- +
- + 1. Status of this Memo
- +
- + This memo provides information for the Internet community. It
- + does not specify any standard. Distribution of this memo is
- + unlimited. Please send comments to the author.
- +
- +
- + 2. Abstract
- +
- + This memo suggests some modest enhancements to version 3 of
- + the Post Office Protocol (RFC 1081). All of these extensions
- + are optional. In particular, administrators should examine
- + their environment to see if any of these enhancements are
- + useful.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- + M. Rose [Page 1]
- +
- +
- +
- +
- +
- + draft POP Version 3: More Service Offerings Apr 92
- +
- +
- + 3. Historical Overview
- +
- + The Post Office Protocol (POP) was developed to provide a
- + simple mechanism for workstations to download their mailboxes
- + from workgroup and departmental servers. Typically, the
- + workstations and servers are interconnected via a LAN or
- + perhaps an internet-mesh with reasonable throughput and
- + latency.
- +
- + As use of the Internet suite of protocols has grown, different
- + kind of environments are beginning to use the POP. This memo
- + suggests optional enhancements to the POP to allow it to
- + function better in these environments.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- + M. Rose [Page 2]
- +
- +
- +
- +
- +
- + draft POP Version 3: More Service Offerings Apr 92
- +
- +
- + 4. The APOP command
- +
- + Each POP session starts with a USER/PASS exchange. This
- + results in a POP-subscriber password being sent in the clear
- + on the network. For intermittent use of POP, this may not
- + introduce a sizable risk. However, many POP client
- + implementations connect to the POP server on a regular
- + basis -- to check for new mail. Further the interval of
- + session initiation may be on the order of five minutes.
- + Hence, the risk of password capture is greatly enhanced.
- +
- + A new method of authentication is required which provides for
- + both origin authentication and replay protection, but which
- + does not involve sending a password in the clear over the
- + network. This memo introduces a new command, APOP, to provide
- + this functionality.
- +
- + A POP server which implements the APOP command will include a
- + timestamp in its banner greeting. The syntax of the timestamp
- + corresponds to the `msg-id' in RFC 822, and MUST be different
- + each time the POP server issues a banner greeting. For
- + example, on a UNIX implementation in which a separate UNIX
- + process is used for each instance of a POP server, the syntax
- + of the timestamp might be:
- +
- + <process-ID.clock@hostname>
- +
- + where `process-ID' is the decimal value of the process's PID,
- + clock is the decimal value of the system clock, and hostname
- + is the fully-qualified domain-name corresponding to the host
- + where the POP server is running.
- +
- + The POP client makes note of this timestamp, and then issues
- + the APOP command. The syntax of this command is:
- +
- + APOP name digest
- +
- + The `name' parameter is a locally-significant string which
- + identifies a particular POP-subscriber. The `digest'
- + parameter is calculated by applying the MD5 algorithm[1] to a
- + string consisting of the timestamp (including angle-brackets)
- + followed by a shared secret. This shared secret is a string
- + known only to the POP client and POP server. Great care
- + should be taken to prevent unauthorized disclosure of the
- + secret, as knowledge of the secret will allow any entity to
- +
- +
- +
- +
- +
- + M. Rose [Page 3]
- +
- +
- +
- +
- +
- + draft POP Version 3: More Service Offerings Apr 92
- +
- +
- + successfully masquerade as the named POP-subscriber. The
- + `digest' parameter itself is a 16-octet value which is sent in
- + hexadecimal format.
- +
- + When the POP server receives the APOP command, it verifies the
- + digest provided. If the digest is correct, the POP server
- + issues a positive response, and the POP session enters the
- + TRANSACTION state. Otherwise, a negative response is issued
- + and the POP session remains in the AUTHORIZATION state.
- +
- + 4.1. Usage Example
- +
- + S: +OK POP server ready <1896.697170952@dbc.mtview.ca.us>
- + C: USER mrose
- + S: +OK password required for mrose
- + C: APOP c4c9334bac560ecc979e58001b3e22fb
- + S: +OK maildrop has 1 message (369 octets)
- +
- + In this example, the shared secret is the string `tanstaaf'.
- + Hence, the MD5 algorithm is applied to the string
- +
- + <1896.697170952@dbc.mtview.ca.us>tanstaaf
- +
- + which produces a digest value of
- +
- + c4c9334bac560ecc979e58001b3e22fb
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- + M. Rose [Page 4]
- +
- +
- +
- +
- +
- + draft POP Version 3: More Service Offerings Apr 92
- +
- +
- + 5. The XTND SCAN command
- +
- + The current POP model works best when network latency and
- + throughput is on the order provided by most LANs. However,
- + when POP is used over low-speed connections (e.g., 2400 baud
- + dialup lines), the POP does not work well.
- +
- + Historically, the POP model has been to make only minimal
- + requirements on the POP server. In order to more effectively
- + operate over low-speed connections, this model must be
- + modified somewhat. Implementation experience shows that the
- + largest improvement can be achieved by making one shift:
- + having the POP server generate a scan listing for the POP
- + client. This memo introduces a new command, XTND SCAN, to
- + provide this functionality.
- +
- + A POP client issues the XTND SCAN command during the
- + TRANSACTION state. The syntax of this command is:
- +
- + XTND SCAN width [format]
- +
- + The `width' parameter is the maximum length for a scan
- + listing. The optional `format' parameter is a quoted-string
- + with the semantics of an mh-format(5) string[2]. If the
- + `format' parameter is not given, the POP server uses a
- + locally-defined default value. Note that the resulting format
- + string must not contain CR or LF.
- +
- + The `format' parameter is the only token in the POP which must
- + be enclosed in double-quotation marks. Within the string, two
- + special sequences are recognized:
- +
- + \" - double-quote
- + \\ - single-\
- +
- + Otherwise, each character is used verbatim. Note that this
- + string can be quite long (on the order of 400 characters).
- +
- + When the POP server receives the XTND SCAN command and if it
- + implements it, it issues a positive response. Otherwise a
- + negative response is issued. Thereafter, whenever the POP
- + client issues a LIST command, the syntax of the resulting
- + `scan listing' is of the form:
- +
- + msgno size #string
- +
- +
- +
- +
- +
- + M. Rose [Page 5]
- +
- +
- +
- +
- +
- + draft POP Version 3: More Service Offerings Apr 92
- +
- +
- + As with the standard POP, the `msgno' field gives the message
- + number and the `size' field gives the size of the message in
- + octets. The `string' parameter, which immediately follows the
- + `#' character is the string calculated when the formatting
- + string is applied to the message. Note that the `string' may
- + not be multiline.
- +
- + 5.1. Usage Example
- +
- + S: XTND SCAN 80 "%4(msg)%<(cur)+%| %>%<{replied}-%|...
- + C: +OK SCAN
- + S: LIST 1
- + C: +OK 1 369 # 1 02/03 17:49PST To:mrose test<<
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- + M. Rose [Page 6]
- +
- +
- +
- +
- +
- + draft POP Version 3: More Service Offerings Apr 92
- +
- +
- + 6. Implementations
- +
- + MH 6.7.4 implements the POP extensions described in this memo.
- + Contact Bug-MH@ics.uci.edu for information on how to get MH.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- + M. Rose [Page 7]
- +
- +
- +
- +
- +
- + draft POP Version 3: More Service Offerings Apr 92
- +
- +
- + 7. Acknowledgements
- +
- + The author gratefully acknowledges the comments of Alfred
- + Grimstad and Neil Ostroff of Bellcore, and Keith McCloghrie of
- + Hughes LAN Systems.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- + M. Rose [Page 8]
- +
- +
- +
- +
- +
- + draft POP Version 3: More Service Offerings Apr 92
- +
- +
- + 8. References
- +
- + [1] R.L. Rivest, The MD5 Message-Digest Algorithm. Request
- + for Comments 1321, (April, 1992).
- +
- + [2] M.T. Rose, J.L. Romine, The Rand MH Message Handling
- + System: User's Manual, November, 1985.
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- + M. Rose [Page 9]
- +
- +
- +
- +
- +
- + draft POP Version 3: More Service Offerings Apr 92
- +
- +
- + Table of Contents
- +
- +
- + 1 Status of this Memo ................................... 1
- + 2 Abstract .............................................. 1
- + 3 Historical Overview ................................... 2
- + 4 The APOP command ...................................... 3
- + 4.1 Usage Example ....................................... 4
- + 5 The XTND SCAN command ................................. 5
- + 5.1 Usage Example ....................................... 6
- + 6 Implementations ....................................... 7
- + 7 Acknowledgements ...................................... 8
- + 8 References ............................................ 9
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- + M. Rose [Page 10]
- +
- *** ../mh-6.7.2/support/pop/popaka.c Thu Apr 5 16:02:52 1990
- --- support/pop/popaka.c Mon Dec 14 16:20:52 1992
- ***************
- *** 1,7 ****
- /* popaka.c - generate POP entries for MMDF-II alias file */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: popaka.c,v 1.4 90/04/05 15:34:58 sources Exp $";
- ! #endif lint
-
- #include <stdio.h>
- #include "../zotnet/bboards.h"
- --- 1,7 ----
- /* popaka.c - generate POP entries for MMDF-II alias file */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: popaka.c,v 1.5 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include <stdio.h>
- #include "../zotnet/bboards.h"
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- support/pop/popauth.c Mon Dec 14 16:20:52 1992
- ***************
- *** 0 ****
- --- 1,251 ----
- + /* popauth.c - manipulate POP authorization DB */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: popauth.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
- +
- + #include "../h/mh.h"
- + #include "popauth.h"
- + #undef DBM /* used by mts.c and ndbm.h */
- + #include <ndbm.h>
- + #include <pwd.h>
- + #include <stdio.h>
- + #include <sys/types.h>
- + #include <sys/stat.h>
- + #include <sys/file.h>
- + #ifdef SYS5
- + #include <fcntl.h>
- + #endif
- + #include "../zotnet/bboards.h"
- + #include "../zotnet/mts.h"
- +
- + /* */
- +
- + static struct swit switches[] = {
- + #define INITSW 0
- + "init", 0,
- + #define LISTSW 1
- + "list", 0,
- + #define USERSW 2
- + "user name", 0,
- +
- + #define HELPSW 3
- + "help", 4,
- +
- + NULL, 0
- + };
- +
- + /* */
- +
- + char *getpass ();
- +
- + /* */
- +
- + /* ARGSUSED */
- +
- + main (argc, argv)
- + int argc;
- + char *argv[];
- + {
- + int flags,
- + i,
- + initsw = 0,
- + insist,
- + listsw = 0;
- + long clock;
- + char *bp,
- + *cp,
- + *usersw = NULL,
- + buf[100],
- + **ap,
- + **argp,
- + *arguments[MAXARGS];
- + datum key,
- + value;
- + DBM *db;
- + struct authinfo auth;
- +
- + invo_name = r1bindex (argv[0], '/');
- + m_foil (NULLCP);
- + if ((cp = m_find (invo_name)) != NULL) {
- + ap = brkstring (cp = getcpy (cp), " ", "\n");
- + ap = copyip (ap, arguments);
- + }
- + else
- + ap = arguments;
- + (void) copyip (argv + 1, ap);
- + argp = arguments;
- +
- + /* */
- +
- + while (cp = *argp++) {
- + if (*cp == '-')
- + switch (smatch (++cp, switches)) {
- + case AMBIGSW:
- + ambigsw (cp, switches);
- + done (1);
- + case UNKWNSW:
- + adios (NULLCP, "-%s unknown", cp);
- + case HELPSW:
- + (void) sprintf (buf, "%s [switches]", invo_name);
- + help (buf, switches);
- + done (1);
- +
- + case INITSW:
- + initsw = 1, listsw = 0;
- + continue;
- + case LISTSW:
- + listsw = 1, initsw = 0;
- + continue;
- + case USERSW:
- + if (!(usersw = *argp++) || *usersw == '-')
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + continue;
- + }
- + adios (NULLCP, "usage: %s [switches]", invo_name);
- + }
- +
- + /* */
- +
- + #ifndef APOP
- + adios (NULLCP, "not compiled with APOP option");
- + #else
- + if (getuid ())
- + initsw = listsw = 0, usersw = NULL;
- +
- + if (initsw) {
- + struct passwd *pw;
- + struct stat st;
- +
- + if ((pw = getpwnam (POPUID)) == NULL)
- + adios (NULLCP, "POP user-id unknown");
- +
- + (void) sprintf (buf, "%s.dir", APOP);
- + if (stat (buf, &st) != NOTOK) {
- + if (!getanswer ("Really initialize POP authorization DB? "))
- + done (1);
- + (void) unlink (buf);
- + (void) sprintf (buf, "%s.pag", APOP);
- + (void) unlink (buf);
- + }
- + if ((db = dbm_open (APOP, O_RDWR | O_CREAT, 0600)) == NULL)
- + adios (APOP, "unable to create POP authorization DB");
- + if (fchown (dbm_dirfno (db), pw -> pw_uid, pw -> pw_gid) == NOTOK
- + || fchown (dbm_pagfno (db), pw -> pw_uid, pw -> pw_gid)
- + == NOTOK)
- + advise (" ", "error setting ownership of POP authorization DB");
- +
- + done (0);
- + }
- +
- + if ((db = dbm_open (APOP, O_RDONLY, 0)) == NULL)
- + adios (APOP, "unable to open POP authorization DB");
- +
- + if (flock (dbm_pagfno (db), LOCK_SH) == NOTOK)
- + adios (APOP, "unable to lock POP authorization DB");
- +
- + if (listsw) {
- + if (usersw) {
- + key.dsize = strlen (key.dptr = usersw) + 1;
- + value = dbm_fetch (db, key);
- + if (value.dptr == NULL)
- + adios (NULLCP, "no such entry in POP authorization DB");
- + bcopy (value.dptr, (char *) &auth, sizeof auth);
- + printf ("%s\n", key.dptr);
- + }
- + else
- + for (key = dbm_firstkey (db); key.dptr; key = dbm_nextkey (db)) {
- + printf ("%s", key.dptr);
- + value = dbm_fetch (db, key);
- + if (value.dptr == NULL)
- + printf (" - no information?!?\n");
- + else {
- + bcopy (value.dptr, (char *) &auth, sizeof auth);
- + printf ("\n");
- + }
- + }
- +
- + dbm_close (db);
- +
- + done (0);
- + }
- +
- + if (usersw == NULL)
- + usersw = getusr ();
- +
- + fprintf (stderr, "Changing POP password for %s.\n", usersw);
- +
- + key.dsize = strlen (key.dptr = usersw) + 1;
- + value = dbm_fetch (db, key);
- + if (value.dptr != NULL) {
- + bcopy (value.dptr, (char *) &auth, sizeof auth);
- + dbm_close (db);
- +
- + if ((i = strlen (strcpy (buf, getpass ("Old password:")))) == 0
- + || auth.auth_secretlen != i
- + || bcmp (buf, auth.auth_secret, i))
- + fprintf (stderr, "Sorry.\n"), exit (1);
- + }
- + else
- + dbm_close (db);
- +
- + #ifdef lint
- + flags = 0;
- + #endif /* lint */
- + for (insist = 0; insist < 2; insist++) {
- + int i;
- + char c;
- +
- + if (insist)
- + printf ("Please use %s.\n",
- + flags == 1 ? "at least one non-numeric character"
- + : "a longer password");
- +
- + if ((i = strlen (strcpy (buf, getpass ("New password:")))) == 0) {
- + fprintf (stderr, "Password unchanged.\n");
- + exit (1);
- + }
- +
- + flags = 0;
- + for (cp = buf; c = *cp++;)
- + if (c >= 'a' && c <= 'z')
- + flags |= 2;
- + else
- + if (c >= 'A' && c <= 'Z')
- + flags |= 4;
- + else
- + if (c >= '0' && c <= '9')
- + flags |= 1;
- + else
- + flags |= 8;
- +
- + if ((flags >= 7 && i >= 4)
- + || ((flags == 2 || flags == 4) && i >= 6)
- + || ((flags == 3 || flags == 5 || flags == 6) && i >= 5))
- + break;
- + }
- +
- + if (strcmp (buf, getpass ("Retype new password:"))) {
- + fprintf (stderr, "Mismatch - password unchanged.\n");
- + exit (1);
- + }
- +
- + if ((db = dbm_open (APOP, O_RDWR, 0)) == NULL)
- + adios (APOP, "unable to open POP authorization DB");
- +
- + if (flock (dbm_pagfno (db), LOCK_EX) == NOTOK)
- + adios (APOP, "unable to lock POP authorization DB");
- +
- + key.dsize = strlen (key.dptr = usersw) + 1;
- +
- + buf[sizeof auth.auth_secret] = NULL;
- + bcopy (buf, auth.auth_secret, auth.auth_secretlen = strlen (buf));
- + value.dptr = (char *) &auth, value.dsize = sizeof auth;
- +
- + if (dbm_store (db, key, value, DBM_REPLACE))
- + adios (NULLCP, "POP authorization DB may be corrupt?!?");
- + dbm_close (db);
- + #endif
- +
- + done (0);
- + /* NOTREACHED */
- + }
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- support/pop/popauth.h Tue Feb 11 09:41:40 1992
- ***************
- *** 0 ****
- --- 1,8 ----
- + /* popauth.h - POP authorization DB definitions */
- + /* @(#)$Id: popauth.h,v 1.1 1992/02/11 17:41:39 jromine Exp $ */
- +
- +
- + struct authinfo {
- + char auth_secret[16];
- + int auth_secretlen;
- + };
- *** ../mh-6.7.2/support/pop/popd.c Mon Apr 9 09:45:16 1990
- --- support/pop/popd.c Mon Dec 14 16:20:53 1992
- ***************
- *** 1,7 ****
- /* popd.c - the POP server */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: popd.c,v 1.8 90/04/09 09:45:09 sources Exp Locker: sources $";
- ! #endif lint
-
- /* Author: Marshall T. Rose <MRose@UDel> (MTR)
- Department of Computer Science and Information Sciences
- --- 1,7 ----
- /* popd.c - the POP server */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: popd.c,v 1.13 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- /* Author: Marshall T. Rose <MRose@UDel> (MTR)
- Department of Computer Science and Information Sciences
- ***************
- *** 21,44 ****
- #include <sys/file.h>
- #ifndef NOIOCTLH
- #include <sys/ioctl.h>
- ! #endif NOIOCTLH
- #include <sys/socket.h>
- #include <sys/time.h>
- #ifdef SIGTSTP
- #include <sys/resource.h>
- #include <sys/wait.h>
- ! #endif SIGTSTP
- #include <netinet/in.h>
- #include <netdb.h>
- #include <arpa/inet.h>
- #ifdef SYS5
- #include <fcntl.h>
- ! #endif SYS5
-
-
- #ifdef SYS5
- #define u_short ushort
- ! #endif SYS5
-
- #define NOTOK (-1)
- #define OK 0
- --- 21,51 ----
- #include <sys/file.h>
- #ifndef NOIOCTLH
- #include <sys/ioctl.h>
- ! #endif
- #include <sys/socket.h>
- #include <sys/time.h>
- #ifdef SIGTSTP
- #include <sys/resource.h>
- #include <sys/wait.h>
- ! #endif
- #include <netinet/in.h>
- #include <netdb.h>
- #include <arpa/inet.h>
- + #ifdef KPOP
- + #include <krb.h>
- +
- + static Key_schedule schedule;
- + static KTEXT_ST ticket;
- + static AUTH_DAT kdata;
- + #endif
- #ifdef SYS5
- #include <fcntl.h>
- ! #endif
-
-
- #ifdef SYS5
- #define u_short ushort
- ! #endif
-
- #define NOTOK (-1)
- #define OK 0
- ***************
- *** 72,77 ****
- --- 79,87 ----
- static struct sockaddr_in in_socket;
- static struct sockaddr_in *isock = &in_socket;
-
- + #ifdef KPOP
- + static AUTH_DAT kdata;
- + #endif
-
- static int chldser ();
- void padios (), padvise ();
- ***************
- *** 86,91 ****
- --- 96,104 ----
- char **argv,
- **envp;
- {
- + #ifdef KPOP
- + int i;
- + #else
- int fd,
- sd;
- int on = 1;
- ***************
- *** 92,110 ****
- --- 105,135 ----
- struct servent *sp;
- struct sockaddr_in out_socket,
- *osock = &out_socket;
- + #endif
-
- + #ifdef KPOP
- + i = sizeof(in_socket);
- + if (getpeername(0, &in_socket, &i) < 0)
- + padios("getpeername", "bad status");
- + #else
- if ((sp = getservbyname (myservice, myprotocol)) == NULL)
- padios (NULLCP, "%s/%s: unknown service", myprotocol, myservice);
- isock -> sin_family = AF_INET;
- isock -> sin_port = sp -> s_port;
- isock -> sin_addr.s_addr = INADDR_ANY;
- + #endif
- arginit (argv);
- envinit ();
-
- + #ifndef KPOP
- #ifdef RESTART
- for (;;) {
- char reason[BUFSIZ];
- + #if defined(BSD42) && !defined(WAITINT)
- union wait status;
- + #else
- + int status;
- + #endif
-
- switch (fork ()) {
- case NOTOK:
- ***************
- *** 137,147 ****
- closelog ();
- #ifndef BSD43
- openlog (myname, LOG_PID);
- ! #else BSD43
- openlog (myname, LOG_PID, LOG_DAEMON);
- ! #endif BSD43
- padvise (NULLCP, LOG_INFO, "restart");
- ! #endif RESTART
-
- /* */
-
- --- 162,172 ----
- closelog ();
- #ifndef BSD43
- openlog (myname, LOG_PID);
- ! #else /* BSD43 */
- openlog (myname, LOG_PID, LOG_DAEMON);
- ! #endif /* BSD43 */
- padvise (NULLCP, LOG_INFO, "restart");
- ! #endif /* RESTART */
-
- /* */
-
- ***************
- *** 153,175 ****
- padvise ("SO_DEBUG", LOG_WARNING, "unable to set socket option");
- if (setsockopt (sd, SOL_SOCKET, SO_KEEPALIVE, NULL, 0) == NOTOK)
- padvise ("SO_KEEPALIVE", LOG_WARNING, "unable to set socket option");
- ! #else BSD43
- if (options & SO_DEBUG)
- if (setsockopt (sd, SOL_SOCKET, SO_DEBUG, &on, sizeof on) == NOTOK)
- padvise ("SO_DEBUG", LOG_WARNING, "unable to set socket option");
- if (setsockopt (sd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof on) == NOTOK)
- padvise ("SO_KEEPALIVE", LOG_WARNING, "unable to set socket option");
- ! #endif BSD43
- if (bind (sd, (struct sockaddr *) isock, sizeof *isock) == NOTOK)
- padios ("socket", "unable to bind");
-
- #ifdef SIGCHLD
- (void) signal (SIGCHLD, chldser);
- ! #endif SIGCHLD
- (void) listen (sd, SOMAXCONN);
- #ifdef FAST
- popinit ();
- ! #endif FAST
- for (;;) {
- int i = sizeof *osock;
-
- --- 178,202 ----
- padvise ("SO_DEBUG", LOG_WARNING, "unable to set socket option");
- if (setsockopt (sd, SOL_SOCKET, SO_KEEPALIVE, NULL, 0) == NOTOK)
- padvise ("SO_KEEPALIVE", LOG_WARNING, "unable to set socket option");
- ! #else /* BSD43 */
- if (options & SO_DEBUG)
- if (setsockopt (sd, SOL_SOCKET, SO_DEBUG, &on, sizeof on) == NOTOK)
- padvise ("SO_DEBUG", LOG_WARNING, "unable to set socket option");
- if (setsockopt (sd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof on) == NOTOK)
- padvise ("SO_KEEPALIVE", LOG_WARNING, "unable to set socket option");
- ! #endif /* BSD43 */
- if (bind (sd, (struct sockaddr *) isock, sizeof *isock) == NOTOK)
- padios ("socket", "unable to bind");
-
- #ifdef SIGCHLD
- (void) signal (SIGCHLD, chldser);
- ! #endif /* SIGCHLD */
- (void) listen (sd, SOMAXCONN);
- + #endif /* KPOP */
- #ifdef FAST
- popinit ();
- ! #endif /* FAST */
- ! #ifndef KPOP
- for (;;) {
- int i = sizeof *osock;
-
- ***************
- *** 179,193 ****
- "unable to accept connection on");
- continue;
- }
- #ifdef FAST
- popassert ();
- ! #endif FAST
- switch (fork ()) {
- case OK:
- (void) close (sd);
- #ifdef SIGCHLD
- (void) signal (SIGCHLD, SIG_DFL);
- ! #endif SIGCHLD
- server (fd, osock);
- _exit (0);
-
- --- 206,222 ----
- "unable to accept connection on");
- continue;
- }
- + #endif
- #ifdef FAST
- popassert ();
- ! #endif /* FAST */
- ! #ifndef KPOP
- switch (fork ()) {
- case OK:
- (void) close (sd);
- #ifdef SIGCHLD
- (void) signal (SIGCHLD, SIG_DFL);
- ! #endif /* SIGCHLD */
- server (fd, osock);
- _exit (0);
-
- ***************
- *** 198,203 ****
- --- 227,235 ----
- (void) close (fd);
- }
- }
- + #else
- + server (0, isock);
- + #endif
- }
-
- /* */
- ***************
- *** 209,233 ****
- u_short port;
- struct hostent *hp;
- struct in_addr *addr;
-
- closelog ();
- #ifndef BSD43
- openlog (myname, LOG_PID);
- ! #else BSD43
- openlog (myname, LOG_PID, LOG_DAEMON);
- ! #endif BSD43
- port = ntohs (sin -> sin_port);
- addr = &sin -> sin_addr;
- hp = gethostbyaddr (addr, sizeof *addr, sin -> sin_family);
- padvise (NULLCP, LOG_INFO, "servicing %s/%d",
- hp ? hp -> h_name : inet_ntoa (*addr), port);
- !
- ! (void) dup2 (fd, 0);
- ! (void) close (fd);
- (void) dup2 (0, 1);
-
- pop (0, 1, sin -> sin_family == AF_INET && port < IPPORT_RESERVED && hp,
- hp ? hp -> h_name : NULLCP);
- }
-
- /* */
- --- 241,296 ----
- u_short port;
- struct hostent *hp;
- struct in_addr *addr;
- + #ifdef KPOP
- + int auth;
- + int sin_len;
- + struct sockaddr_in faddr;
- + char instance[INST_SZ];
- + char version[9];
- + char user[ANAME_SZ];
- + #endif
-
- closelog ();
- #ifndef BSD43
- openlog (myname, LOG_PID);
- ! #else /* BSD43 */
- openlog (myname, LOG_PID, LOG_DAEMON);
- ! #endif /* BSD43 */
- port = ntohs (sin -> sin_port);
- addr = &sin -> sin_addr;
- hp = gethostbyaddr (addr, sizeof *addr, sin -> sin_family);
- padvise (NULLCP, LOG_INFO, "servicing %s/%d",
- hp ? hp -> h_name : inet_ntoa (*addr), port);
- ! if (fd != 0)
- ! {
- ! (void) dup2 (fd, 0);
- ! (void) close (fd);
- ! }
- (void) dup2 (0, 1);
-
- + #ifdef KPOP
- + sin_len = sizeof (struct sockaddr_in);
- + if (getpeername(0, &faddr, &sin_len) < 0) {
- + padvise("getpeername", LOG_INFO, "");
- + exit(1);
- + }
- + strcpy(instance, "*");
- + auth = krb_recvauth(0L, 0, &ticket, "pop", instance,
- + &faddr, (struct sockaddr_in *)NULL,
- + &kdata, "", schedule, version);
- + if (auth == KSUCCESS)
- + auth = krb_kntoln(&kdata, user);
- +
- + if (auth != KSUCCESS) {
- + padvise(NULLCP, LOG_INFO, "bad kerberos data, not ok'ing");
- + kpop (0, 1, NULLCP, NULLCP, auth); /* respond(NOTOK, krb_err_txt[auth]); */
- + } else {
- + kpop (0, 1, user, (hp ? hp -> h_name : NULLCP), 0);
- + }
- + #else
- pop (0, 1, sin -> sin_family == AF_INET && port < IPPORT_RESERVED && hp,
- hp ? hp -> h_name : NULLCP);
- + #endif
- }
-
- /* */
- ***************
- *** 241,253 ****
-
- if (myname = rindex (*vec, '/'))
- myname++;
- ! if (myname == NULL || *myname == NULL)
- myname = *vec;
-
- (void) gethostname (myhost, sizeof myhost);
- if (hp = gethostbyname (myhost))
- (void) strcpy (myhost, hp -> h_name);
- nbits = getdtablesize ();
-
- for (vec++; ap = *vec; vec++) {
- if (*ap == '-')
- --- 304,320 ----
-
- if (myname = rindex (*vec, '/'))
- myname++;
- ! if (myname == NULL || *myname == 0)
- myname = *vec;
-
- (void) gethostname (myhost, sizeof myhost);
- if (hp = gethostbyname (myhost))
- (void) strcpy (myhost, hp -> h_name);
- + #ifndef BSD42
- + nbits = _NFILE;
- + #else /* BSD42 */
- nbits = getdtablesize ();
- + #endif /* BSD42 */
-
- for (vec++; ap = *vec; vec++) {
- if (*ap == '-')
- ***************
- *** 275,280 ****
- --- 342,348 ----
- /* */
-
- static envinit () {
- + #ifndef KPOP
- int i,
- sd;
-
- ***************
- *** 306,312 ****
- if ((sd = open ("/dev/tty", O_RDWR)) != NOTOK) {
- #ifdef TIOCNOTTY
- (void) ioctl (sd, TIOCNOTTY, NULLCP);
- ! #endif TIOCNOTTY
- (void) close (sd);
- }
- }
- --- 374,380 ----
- if ((sd = open ("/dev/tty", O_RDWR)) != NOTOK) {
- #ifdef TIOCNOTTY
- (void) ioctl (sd, TIOCNOTTY, NULLCP);
- ! #endif /* TIOCNOTTY */
- (void) close (sd);
- }
- }
- ***************
- *** 313,326 ****
-
- for (sd = 3; sd < nbits; sd++)
- (void) close (sd);
-
- (void) signal (SIGPIPE, SIG_IGN);
-
- #ifndef BSD43
- openlog (myname, LOG_PID);
- ! #else BSD43
- openlog (myname, LOG_PID, LOG_DAEMON);
- ! #endif BSD43
- padvise (NULLCP, LOG_INFO, "starting");
- if (debug)
- padvise (NULLCP, LOG_DEBUG, "options=0x%x port=%d",
- --- 381,395 ----
-
- for (sd = 3; sd < nbits; sd++)
- (void) close (sd);
- + #endif /* KPOP */
-
- (void) signal (SIGPIPE, SIG_IGN);
-
- #ifndef BSD43
- openlog (myname, LOG_PID);
- ! #else /* BSD43 */
- openlog (myname, LOG_PID, LOG_DAEMON);
- ! #endif /* BSD43 */
- padvise (NULLCP, LOG_INFO, "starting");
- if (debug)
- padvise (NULLCP, LOG_DEBUG, "options=0x%x port=%d",
- ***************
- *** 329,334 ****
- --- 398,405 ----
-
- /* */
-
- + #ifndef KPOP
- +
- /* ARGSUSED */
-
- #ifdef SIGCHLD
- ***************
- *** 338,350 ****
- long code;
- struct sigcontext *sc;
- {
- union wait status;
-
- while (wait3 (&status, WNOHANG, NULLRP) > 0)
- continue;
- }
-
- ! #endif SIGCHLD
-
- /* */
-
- --- 409,426 ----
- long code;
- struct sigcontext *sc;
- {
- + #if defined(BSD42) && !defined(WAITINT)
- + int status;
- + #else
- union wait status;
- + #endif
-
- while (wait3 (&status, WNOHANG, NULLRP) > 0)
- continue;
- }
-
- ! #endif /* SIGCHLD */
- ! #endif /* KPOP */
-
- /* */
-
- *** ../mh-6.7.2/support/pop/popser.c Fri Nov 16 16:06:38 1990
- --- support/pop/popser.c Mon Dec 14 16:20:55 1992
- ***************
- *** 1,10 ****
- /* popser.c - the POP service */
- #ifndef lint
- ! static char ident[]="@(#)$Id: popser.c,v 1.16 90/11/16 14:56:38 mh Exp $";
- #endif
-
- #include "../h/mh.h"
- #include "../h/dropsbr.h"
- #include "../zotnet/bboards.h"
- #include <stdio.h>
- #include "../zotnet/mts.h"
- --- 1,16 ----
- /* popser.c - the POP service */
- #ifndef lint
- ! static char ident[]="@(#)$Id: popser.c,v 1.29 1992/12/15 00:20:22 jromine Exp $";
- #endif
-
- #include "../h/mh.h"
- #include "../h/dropsbr.h"
- + #ifdef MPOP
- + #ifdef BPOP
- + #include "../h/formatsbr.h"
- + #include "../h/scansbr.h"
- + #endif
- + #endif /* MPOP */
- #include "../zotnet/bboards.h"
- #include <stdio.h>
- #include "../zotnet/mts.h"
- ***************
- *** 15,32 ****
- #include "syslog.h"
- #include <sys/types.h>
- #include <sys/stat.h>
- #ifdef SYS5
- #include <fcntl.h>
- ! #endif SYS5
- #ifdef SHADOW
- #include <shadow.h>
- ! #endif SHADOW
-
-
- #define TRUE 1
- #define FALSE 0
-
- ! #define NVEC 4
-
- #ifndef POPSERVICE
- #define POPSERVICE "pop"
- --- 21,41 ----
- #include "syslog.h"
- #include <sys/types.h>
- #include <sys/stat.h>
- + #ifdef KPOP
- + #include <krb.h>
- + #endif /* KPOP */
- #ifdef SYS5
- #include <fcntl.h>
- ! #endif /* SYS5 */
- #ifdef SHADOW
- #include <shadow.h>
- ! #endif /* SHADOW */
-
-
- #define TRUE 1
- #define FALSE 0
-
- ! #define NVEC 5
-
- #ifndef POPSERVICE
- #define POPSERVICE "pop"
- ***************
- *** 54,73 ****
- static int user (), pass ();
- #ifdef BPOP
- static isguest(), getbbmax();
- static int xtnd1(), xtnd2();
- ! #endif BPOP
- #ifdef RPOP
- static int rpop ();
- ! #endif RPOP
- static int status (), list (), retrieve (), delete (), reset ();
- static int top (), last ();
- #ifdef BPOP
- ! int xtnd ();
- ! #endif BPOP
- static int quit ();
- #ifdef POP2
- static int helo (), rdp2 (), acks (), ack2 (), fold (), nack ();
- ! #endif POP2
-
- static struct vector {
- char *v_cmd;
- --- 63,89 ----
- static int user (), pass ();
- #ifdef BPOP
- static isguest(), getbbmax();
- + #ifndef MPOP
- static int xtnd1(), xtnd2();
- ! #else
- ! static int xtnd1(), xtnd2(), xtnd3 ();
- ! #endif /* MPOP */
- ! #endif /* BPOP */
- #ifdef RPOP
- static int rpop ();
- ! #endif /* RPOP */
- ! #ifdef APOP
- ! static int apop ();
- ! #endif
- static int status (), list (), retrieve (), delete (), reset ();
- static int top (), last ();
- #ifdef BPOP
- ! static int xtnd ();
- ! #endif /* BPOP */
- static int quit ();
- #ifdef POP2
- static int helo (), rdp2 (), acks (), ack2 (), fold (), nack ();
- ! #endif /* POP2 */
-
- static struct vector {
- char *v_cmd;
- ***************
- *** 80,86 ****
- "pass", 1, 1, pass, auth2, trans, auth1,
- #ifdef RPOP
- "rpop", 1, 1, rpop, auth2, trans, auth1,
- ! #endif RPOP
- "quit", 0, 0, NULL, auth1, halt, halt,
- "quit", 0, 0, NULL, auth2, halt, halt,
-
- --- 96,105 ----
- "pass", 1, 1, pass, auth2, trans, auth1,
- #ifdef RPOP
- "rpop", 1, 1, rpop, auth2, trans, auth1,
- ! #endif /* RPOP */
- ! #ifdef APOP
- ! "apop", 2, 2, apop, auth1, trans, auth1,
- ! #endif
- "quit", 0, 0, NULL, auth1, halt, halt,
- "quit", 0, 0, NULL, auth2, halt, halt,
-
- ***************
- *** 94,101 ****
- "top", 2, 2, top, trans, trans, trans,
- "last", 0, 0, last, trans, trans, trans,
- #ifdef BPOP
- "xtnd", 1, 2, xtnd, trans, trans, trans,
- ! #endif BPOP
- "quit", 0, 0, quit, trans, halt, halt,
-
- #ifdef POP2
- --- 113,124 ----
- "top", 2, 2, top, trans, trans, trans,
- "last", 0, 0, last, trans, trans, trans,
- #ifdef BPOP
- + #ifndef MPOP
- "xtnd", 1, 2, xtnd, trans, trans, trans,
- ! #else
- ! "xtnd", 1, 3, xtnd, trans, trans, trans,
- ! #endif /* MPOP */
- ! #endif /* BPOP */
- "quit", 0, 0, quit, trans, halt, halt,
-
- #ifdef POP2
- ***************
- *** 115,121 ****
- "nack", 0, 0, rdp2, ack, item, error,
- "quit", 0, 0, NULL, ack, halt, halt,
-
- ! #endif POP2
- NULL
- };
-
- --- 138,144 ----
- "nack", 0, 0, rdp2, ack, item, error,
- "quit", 0, 0, NULL, ack, halt, halt,
-
- ! #endif /* POP2 */
- NULL
- };
-
- ***************
- *** 125,139 ****
-
- #ifdef POP2
- static int pop2 = NOTOK; /* current pop2 msg, or NOTOK if pop3 */
- ! #endif POP2
- #ifdef DPOP
- static int pop_uid;
- static int pop_gid;
- ! #endif DPOP
-
- static int rproto;
- static char *hostname;
- static char server[BUFSIZ];
-
- static char username[BUFSIZ];
-
- --- 148,163 ----
-
- #ifdef POP2
- static int pop2 = NOTOK; /* current pop2 msg, or NOTOK if pop3 */
- ! #endif /* POP2 */
- #ifdef DPOP
- static int pop_uid;
- static int pop_gid;
- ! #endif /* DPOP */
-
- static int rproto;
- static char *hostname;
- static char server[BUFSIZ];
- + static char timestamp[BUFSIZ];
-
- static char username[BUFSIZ];
-
- ***************
- *** 156,163 ****
-
- static long BBtime = 0L;
-
- ! struct bboard *getbbaux ();
- ! #endif BPOP
-
-
- struct Msg { /* Msgs[0] contains info for entire maildrop */
- --- 180,187 ----
-
- static long BBtime = 0L;
-
- ! static struct bboard *getbbaux ();
- ! #endif /* BPOP */
-
-
- struct Msg { /* Msgs[0] contains info for entire maildrop */
- ***************
- *** 179,184 ****
- --- 203,214 ----
-
- static int nmsgs;
- static int dmsgs;
- + #ifdef MPOP
- + #ifdef BPOP
- + static int _sc_width = 0;
- + static char *nfs = NULL;
- + #endif
- + #endif /* MPOP */
-
-
- #define TRM "."
- ***************
- *** 190,195 ****
- --- 220,230 ----
- FILE *input;
- FILE *output;
-
- + #ifndef __STDC__
- + #ifdef SYS5
- + struct passwd *getpwnam();
- + #endif
- + #endif
-
- void padvise (), padios ();
- long lseek ();
- ***************
- *** 202,209 ****
- static p_cmatch(), p_isdate(), p_ishead(), p_parse(), any();
- #else
- #define MBX_READ mbx_read
- - extern int mbx_read ();
- #endif
-
- static int setup(), setupaux(), read_map(), read_file(), pmbx_size();
- static int quitaux(), quitfile(), respond(), getline();
- --- 237,244 ----
- static p_cmatch(), p_isdate(), p_ishead(), p_parse(), any();
- #else
- #define MBX_READ mbx_read
- #endif
- + extern int mbx_read ();
-
- static int setup(), setupaux(), read_map(), read_file(), pmbx_size();
- static int quitaux(), quitfile(), respond(), getline();
- ***************
- *** 217,223 ****
- BBhead = BBtail = NULL;
- while (getbbaux (NULLCP))
- continue;
- ! #endif BPOP
- }
-
- popassert () {
- --- 252,258 ----
- BBhead = BBtail = NULL;
- while (getbbaux (NULLCP))
- continue;
- ! #endif /* BPOP */
- }
-
- popassert () {
- ***************
- *** 273,302 ****
- BBhead = BBtail = NULL;
- while (getbbaux (NULLCP))
- continue;
- ! #endif BPOP
- }
-
- /* */
-
- pop (in, out, priv, rhost)
- int in,
- out,
- priv;
- char *rhost;
- {
- char buffer[BUFSIZ],
- *vec[NVEC + 1];
- #if defined (DPOP) || defined (BPOP)
- register struct passwd *pw;
- ! #endif defined (DPOP) || defined (BPOP)
- register struct vector *v;
-
- m_foil (NULLCP);
- mts_init (myname);
-
- - rproto = priv;
- hostname = rhost;
- ! (void) sprintf (server, "%s %s server", myhost, priv ? "RPOP" : "POP");
-
- if ((input = fdopen (in, "r")) == NULL
- || (output = fdopen (out, "w")) == NULL) {/* you lose big */
- --- 308,352 ----
- BBhead = BBtail = NULL;
- while (getbbaux (NULLCP))
- continue;
- ! #endif /* BPOP */
- }
-
- /* */
-
- + #ifdef KPOP
- + static char *kusername;
- +
- + kpop (in, out, principal, rhost, auth)
- + int in,
- + out;
- + char *principal, *rhost;
- + int auth;
- + #else /* KPOP */
- pop (in, out, priv, rhost)
- int in,
- out,
- priv;
- char *rhost;
- + #endif /* KPOP */
- {
- char buffer[BUFSIZ],
- *vec[NVEC + 1];
- #if defined (DPOP) || defined (BPOP)
- register struct passwd *pw;
- ! #endif /* defined (DPOP) || defined (BPOP) */
- register struct vector *v;
-
- m_foil (NULLCP);
- mts_init (myname);
-
- hostname = rhost;
- ! #ifdef KPOP
- ! rproto = 1;
- ! (void) sprintf (server, "%s KPOP server", myhost);
- ! #else
- ! rproto = priv;
- ! (void) sprintf (server, "%s server", priv ? "RPOP" : "POP");
- ! #endif /* KPOP */
-
- if ((input = fdopen (in, "r")) == NULL
- || (output = fdopen (out, "w")) == NULL) {/* you lose big */
- ***************
- *** 304,309 ****
- --- 354,369 ----
- return;
- }
- (void) signal (SIGPIPE, pipeser);
- + #ifdef KPOP
- + if (principal == NULLCP) {
- + char buf[512];
- + strcpy(buf, "Authentication failed: ");
- + strcat(buf, krb_err_txt[auth]);
- + (void) respond (NOTOK, buf);
- + return;
- + }
- + kusername = principal;
- + #endif /* KPOP */
-
- #ifdef DPOP
- if ((pw = getpwnam (POPUID)) == NULL || !setpwinfo (pw, POPDB, 1)) {
- ***************
- *** 313,319 ****
- }
- pop_uid = pw -> pw_uid;
- pop_gid = pw -> pw_gid;
- ! #endif DPOP
- #ifdef BPOP
- if ((pw = getpwnam (popbbuser)) && pw -> pw_uid) {
- guest_uid = pw -> pw_uid;
- --- 373,379 ----
- }
- pop_uid = pw -> pw_uid;
- pop_gid = pw -> pw_gid;
- ! #endif /* DPOP */
- #ifdef BPOP
- if ((pw = getpwnam (popbbuser)) && pw -> pw_uid) {
- guest_uid = pw -> pw_uid;
- ***************
- *** 321,331 ****
- }
- else
- guest_uid = guest_gid = 0;
- ! #endif BPOP
-
- ! (void) respond (OK, "%s ready (Comments to: PostMaster@%s)",
- ! server, myhost);
-
- for (mystate = auth1; mystate != halt && mystate != error;)
- switch (getline (buffer, sizeof buffer, input)) {
- case OK:
- --- 381,396 ----
- }
- else
- guest_uid = guest_gid = 0;
- ! #endif /* BPOP */
-
- ! {
- ! long clock;
-
- + (void) time (&clock);
- + (void) sprintf (timestamp, "<%d.%ld@%s>", getpid (), clock, myhost);
- + }
- + (void) respond (OK, "%s ready %s", server, timestamp);
- +
- for (mystate = auth1; mystate != halt && mystate != error;)
- switch (getline (buffer, sizeof buffer, input)) {
- case OK:
- ***************
- *** 360,367 ****
- register char **vec;
- {
- make_lower (username, vec[1]);
- !
- return respond (OK, "password required for %s", username);
- }
-
- /* */
- --- 425,441 ----
- register char **vec;
- {
- make_lower (username, vec[1]);
- ! #ifdef KPOP
- ! if (!strcmp(username, kusername))
- ! return respond (OK, "Kerberos authentication succeeded. Send username as password (%s)", username);
- ! else {
- ! respond (NOTOK, "Wrong username supplied (%s vs. %s)",
- ! kusername, username);
- ! return (NOTOK);
- ! }
- ! #else
- return respond (OK, "password required for %s", username);
- + #endif
- }
-
- /* */
- ***************
- *** 374,384 ****
- register struct passwd *pw;
- #ifdef SHADOW
- register struct spwd *shpw;
- ! #endif SHADOW
- ! #else DPOP
- register struct bboard *pw;
- ! #endif DPOP
-
- #ifndef DPOP
- #ifdef BPOP
- if (isguest ()) {
- --- 448,478 ----
- register struct passwd *pw;
- #ifdef SHADOW
- register struct spwd *shpw;
- ! #endif /* SHADOW */
- ! #else /* DPOP */
- register struct bboard *pw;
- ! #endif /* DPOP */
-
- + #ifdef KPOP
- + #ifndef DPOP
- + if ((pw = getpwnam (username)) != NULL)
- + return setup(pw, FALSE);
- + else
- + return respond (NOTOK, "no local password entry");
- + #else
- + {
- + static struct bboard entry;
- + static char entry_file[BUFSIZ] = "/usr/spool/pop";
- +
- + pw = &entry;
- + pw->bb_name = username;
- + strcat(entry_file, username);
- + pw->bb_file = entry_file;
- + return setup(pw, FALSE);
- + }
- + #endif
- + #else /* KPOP */
- +
- #ifndef DPOP
- #ifdef BPOP
- if (isguest ()) {
- ***************
- *** 388,414 ****
- gw.pw_name = popbbuser;
- gw.pw_uid = guest_uid;
- pw = &gw;
- ! #endif TRUSTED
- guest = 1;
- goto anonymous;
- }
- ! #endif BPOP
- if ((pw = getpwnam (username)) == NULL
- #ifndef SHADOW
- || *pw -> pw_passwd == NULL
- || strcmp (crypt (vec[1], pw -> pw_passwd), pw -> pw_passwd)) {
- ! #else SHADOW
- || (shpw = getspnam (username)) == NULL
- || *shpw -> sp_pwdp == NULL
- || strcmp (crypt (vec[1], shpw -> sp_pwdp), shpw -> sp_pwdp)) {
- ! #endif SHADOW
- #ifdef TRUSTED
- trusted (0, hostname, NULLCP, 0, pw ? pw -> pw_name : username,
- pw && pw -> pw_uid == 0, POPSERVICE, "tcp", NULL);
- ! #endif TRUSTED
- return respond (NOTOK, "login incorrect");
- }
- ! #else DPOP
- #ifdef BPOP
- if (isguest ()) {
- static struct bboard gw;
- --- 482,508 ----
- gw.pw_name = popbbuser;
- gw.pw_uid = guest_uid;
- pw = &gw;
- ! #endif /* TRUSTED */
- guest = 1;
- goto anonymous;
- }
- ! #endif /* BPOP */
- if ((pw = getpwnam (username)) == NULL
- #ifndef SHADOW
- || *pw -> pw_passwd == NULL
- || strcmp (crypt (vec[1], pw -> pw_passwd), pw -> pw_passwd)) {
- ! #else /* SHADOW */
- || (shpw = getspnam (username)) == NULL
- || *shpw -> sp_pwdp == NULL
- || strcmp (crypt (vec[1], shpw -> sp_pwdp), shpw -> sp_pwdp)) {
- ! #endif /* SHADOW */
- #ifdef TRUSTED
- trusted (0, hostname, NULLCP, 0, pw ? pw -> pw_name : username,
- pw && pw -> pw_uid == 0, POPSERVICE, "tcp", NULL);
- ! #endif /* TRUSTED */
- return respond (NOTOK, "login incorrect");
- }
- ! #else /* DPOP */
- #ifdef BPOP
- if (isguest ()) {
- static struct bboard gw;
- ***************
- *** 418,424 ****
- guest = 1;
- goto anonymous;
- }
- ! #endif BPOP
- if (((pw = getbbnam (username)) == NULL
- && (pw = getbbaka (username)) == NULL)
- || *pw -> bb_passwd == NULL
- --- 512,518 ----
- guest = 1;
- goto anonymous;
- }
- ! #endif /* BPOP */
- if (((pw = getbbnam (username)) == NULL
- && (pw = getbbaka (username)) == NULL)
- || *pw -> bb_passwd == NULL
- ***************
- *** 426,451 ****
- #ifdef TRUSTED
- trusted (0, hostname, NULLCP, 0, pw ? pw -> bb_name : username,
- 0, POPSERVICE, "tcp", NULL);
- ! #endif TRUSTED
- return respond (NOTOK, "login incorrect");
- }
- ! #endif DPOP
-
- #ifdef BPOP
- anonymous: ;
- ! #endif BPOP
- #ifdef TRUSTED
- if (trusted (1, hostname, NULLCP, 0, myhost,
- #ifndef DPOP
- pw -> pw_name, pw -> pw_uid == 0,
- ! #else DPOP
- pw -> bb_name, 0,
- ! #endif DPOP
- POPSERVICE, "tcp", NULL)
- == 0)
- return respond (NOTOK, "permission denied");
- ! #endif TRUSTED
- return setup (pw, guest);
- }
-
- /* */
- --- 520,546 ----
- #ifdef TRUSTED
- trusted (0, hostname, NULLCP, 0, pw ? pw -> bb_name : username,
- 0, POPSERVICE, "tcp", NULL);
- ! #endif /* TRUSTED */
- return respond (NOTOK, "login incorrect");
- }
- ! #endif /* DPOP */
-
- #ifdef BPOP
- anonymous: ;
- ! #endif /* BPOP */
- #ifdef TRUSTED
- if (trusted (1, hostname, NULLCP, 0, myhost,
- #ifndef DPOP
- pw -> pw_name, pw -> pw_uid == 0,
- ! #else /* DPOP */
- pw -> bb_name, 0,
- ! #endif /* DPOP */
- POPSERVICE, "tcp", NULL)
- == 0)
- return respond (NOTOK, "permission denied");
- ! #endif /* TRUSTED */
- return setup (pw, guest);
- + #endif /* KPOP */
- }
-
- /* */
- ***************
- *** 477,483 ****
-
- return i;
- }
- ! #endif BPOP
-
- /* */
-
- --- 572,578 ----
-
- return i;
- }
- ! #endif /* BPOP */
-
- /* */
-
- ***************
- *** 487,499 ****
- {
- #ifndef DPOP
- register struct passwd *pw;
- ! #else DPOP
- register int hostok = 0;
- register char *bp,
- *cp;
- char buffer[BUFSIZ];
- register struct bboard *pw;
- ! #endif DPOP
-
- #ifndef DPOP
- if (!rproto || (pw = getpwnam (username)) == NULL) {
- --- 582,594 ----
- {
- #ifndef DPOP
- register struct passwd *pw;
- ! #else /* DPOP */
- register int hostok = 0;
- register char *bp,
- *cp;
- char buffer[BUFSIZ];
- register struct bboard *pw;
- ! #endif /* DPOP */
-
- #ifndef DPOP
- if (!rproto || (pw = getpwnam (username)) == NULL) {
- ***************
- *** 500,506 ****
- #ifdef TRUSTED
- trusted (0, hostname, vec[1], 0, username, 0, "rpop", "tcp",
- NULL);
- ! #endif TRUSTED
- return respond (NOTOK, "login incorrect");
- }
- if (chdir (pw -> pw_dir) == NOTOK && chdir ("/") == NOTOK)
- --- 595,601 ----
- #ifdef TRUSTED
- trusted (0, hostname, vec[1], 0, username, 0, "rpop", "tcp",
- NULL);
- ! #endif /* TRUSTED */
- return respond (NOTOK, "login incorrect");
- }
- if (chdir (pw -> pw_dir) == NOTOK && chdir ("/") == NOTOK)
- ***************
- *** 509,518 ****
- #ifdef TRUSTED
- trusted (0, hostname, vec[1], 0, pw -> pw_name,
- pw -> pw_uid == 0, "rpop", "tcp", NULL);
- ! #endif TRUSTED
- return respond (NOTOK, "permission denied");
- }
- ! #else DPOP
- if (!rproto
- || ((pw = getbbnam (username)) == NULL
- && (pw = getbbaka (username)) == NULL)) {
- --- 604,613 ----
- #ifdef TRUSTED
- trusted (0, hostname, vec[1], 0, pw -> pw_name,
- pw -> pw_uid == 0, "rpop", "tcp", NULL);
- ! #endif /* TRUSTED */
- return respond (NOTOK, "permission denied");
- }
- ! #else /* DPOP */
- if (!rproto
- || ((pw = getbbnam (username)) == NULL
- && (pw = getbbaka (username)) == NULL)) {
- ***************
- *** 519,525 ****
- #ifdef TRUSTED
- trusted (0, hostname, vec[1], 0, username, 0, "rpop", "tcp",
- NULL);
- ! #endif TRUSTED
- return respond (NOTOK, "login incorrect");
- }
- /*
- --- 614,620 ----
- #ifdef TRUSTED
- trusted (0, hostname, vec[1], 0, username, 0, "rpop", "tcp",
- NULL);
- ! #endif /* TRUSTED */
- return respond (NOTOK, "login incorrect");
- }
- /*
- ***************
- *** 530,536 ****
- (void) sprintf (buffer, "%s@%s", vec[1], hostname);
- for (bp = pw -> bb_addr; bp; bp = cp) {
- if ((cp = index (bp, ',')))
- ! *cp = NULL;
- hostok = uleq (bp, buffer);
- if (cp)
- *cp++ = ',';
- --- 625,631 ----
- (void) sprintf (buffer, "%s@%s", vec[1], hostname);
- for (bp = pw -> bb_addr; bp; bp = cp) {
- if ((cp = index (bp, ',')))
- ! *cp = 0;
- hostok = uleq (bp, buffer);
- if (cp)
- *cp++ = ',';
- ***************
- *** 541,574 ****
- #ifdef TRUSTED
- trusted (0, hostname, vec[1], 0, pw -> bb_name, 0, "rpop",
- "tcp", NULL);
- ! #endif TRUSTED
- return respond (NOTOK, "permission denied");
- }
- ! #endif DPOP
-
- #ifdef TRUSTED
- if (trusted (1, hostname, vec[1], 0, username,
- #ifndef DPOP
- pw -> pw_uid == 0,
- ! #else DPOP
- 0,
- ! #endif DPOP
- "rpop", "tcp", NULL)
- == 0)
- return respond (NOTOK, "permission denied");
- ! #endif TRUSTED
- return setup (pw, FALSE);
- }
- ! #endif RPOP
-
- /* */
-
- static int setup (pw, guest)
- #ifndef DPOP
- register struct passwd *pw;
- ! #else DPOP
- register struct bboard *pw;
- ! #endif DPOP
- int guest;
- {
- #ifdef BPOP
- --- 636,761 ----
- #ifdef TRUSTED
- trusted (0, hostname, vec[1], 0, pw -> bb_name, 0, "rpop",
- "tcp", NULL);
- ! #endif /* TRUSTED */
- return respond (NOTOK, "permission denied");
- }
- ! #endif /* DPOP */
-
- #ifdef TRUSTED
- if (trusted (1, hostname, vec[1], 0, username,
- #ifndef DPOP
- pw -> pw_uid == 0,
- ! #else /* DPOP */
- 0,
- ! #endif /* DPOP */
- "rpop", "tcp", NULL)
- == 0)
- return respond (NOTOK, "permission denied");
- ! #endif /* TRUSTED */
- return setup (pw, FALSE);
- }
- ! #endif /* RPOP */
-
- /* */
-
- + #ifdef APOP
- + #include "popauth.h"
- + #include "../../uip/md5.c"
- + #include <ndbm.h>
- + #include <sys/file.h>
- + #ifdef SYS5
- + #include <fcntl.h>
- + #endif
- +
- +
- + static int apop (vec)
- + register char **vec;
- + {
- + register char *cp;
- + char buffer[BUFSIZ];
- + register unsigned char *dp;
- + unsigned char *ep,
- + digest[16];
- + #ifndef DPOP
- + register struct passwd *pw;
- + #else
- + register struct bboard *pw;
- + #endif
- + struct stat st;
- + datum key,
- + value;
- + DBM *db;
- + MD5_CTX mdContext;
- + struct authinfo auth;
- +
- + (void) strcpy (username, vec[1]);
- +
- + #ifndef DPOP
- + if ((pw = getpwnam (username)) == NULL
- + || *pw -> pw_passwd == NULL) {
- + return respond (NOTOK, "user invalid");
- + }
- + #else
- + if (((pw = getbbnam (username)) == NULL
- + && (pw = getbbaka (username)) == NULL)
- + || *pw -> bb_passwd == NULL) {
- + return respond (NOTOK, "subscriber invalid");
- + }
- + #endif
- +
- + if ((db = dbm_open (APOP, O_RDONLY, 0)) == NULL)
- + return respond (NOTOK, "POP authorization DB not available (%d)",
- + errno);
- + if (fstat (dbm_pagfno (db), &st) != NOTOK
- + && (st.st_mode & 0777) != 0600) {
- + dbm_close (db);
- + return respond (NOTOK, "POP authorization DB has wrong mode (0%o)",
- + st.st_mode & 0777);
- + }
- + if (flock (dbm_pagfno (db), LOCK_SH) == NOTOK) {
- + dbm_close (db);
- + return respond (NOTOK, "unable to lock POP authorization DB (%d)",
- + errno);
- + }
- + key.dsize = strlen (key.dptr = vec[1]) + 1;
- + value = dbm_fetch (db, key);
- + if (value.dptr == NULL) {
- + dbm_close (db);
- + return respond (NOTOK, "not authorized");
- + }
- + bcopy (value.dptr, (char *) &auth, sizeof auth);
- + (void) sprintf (cp = buffer, "%s%*.*s", timestamp, auth.auth_secretlen,
- + auth.auth_secretlen, auth.auth_secret);
- +
- + dbm_close (db);
- +
- + MD5Init (&mdContext);
- + MD5Update (&mdContext, (unsigned char *) buffer,
- + (unsigned int) (strlen (timestamp) + auth.auth_secretlen));
- + MD5Final (digest, &mdContext);
- +
- + cp = buffer;
- + for (ep = (dp = digest) + sizeof digest / sizeof digest[0];
- + dp < ep;
- + cp += 2)
- + (void) sprintf (cp, "%02x", *dp++ & 0xff);
- + *cp = NULL;
- +
- + if (strcmp (vec[2], buffer))
- + return respond (NOTOK, "authentication failure");
- +
- + return setup (pw, 0);
- + }
- + #endif
- +
- + /* */
- +
- static int setup (pw, guest)
- #ifndef DPOP
- register struct passwd *pw;
- ! #else /* DPOP */
- register struct bboard *pw;
- ! #endif /* DPOP */
- int guest;
- {
- #ifdef BPOP
- ***************
- *** 576,610 ****
- (void) setgid (guest_gid);
- #ifndef SYS5
- (void) initgroups (popbbuser, guest_gid);
- ! #endif SYS5
- (void) setuid (guest_uid);
- }
- else {
- ! #endif BPOP
- #ifndef DPOP
- (void) setgid (pw -> pw_gid);
- #ifndef SYS5
- (void) initgroups (pw -> pw_name, pw -> pw_gid);
- ! #endif SYS5
- (void) setuid (pw -> pw_uid);
- ! #else DPOP
- (void) setgid (pop_gid);
- #ifndef SYS5
- (void) initgroups (POPUID, pop_gid);
- ! #endif SYS5
- (void) setuid (pop_uid);
- ! #endif DPOP
- #ifdef BPOP
- }
- ! #endif BPOP
-
- #ifndef DPOP
- (void) sprintf (maildrop, "%s/%s",
- mmdfldir && *mmdfldir ? mmdfldir : pw -> pw_dir,
- mmdflfil && *mmdflfil ? mmdflfil : pw -> pw_name);
- ! #else DPOP
- (void) strcpy (maildrop, pw -> bb_file);
- ! #endif DPOP
-
- if (setupaux (guest) == NOTOK)
- return NOTOK;
- --- 763,797 ----
- (void) setgid (guest_gid);
- #ifndef SYS5
- (void) initgroups (popbbuser, guest_gid);
- ! #endif /* SYS5 */
- (void) setuid (guest_uid);
- }
- else {
- ! #endif /* BPOP */
- #ifndef DPOP
- (void) setgid (pw -> pw_gid);
- #ifndef SYS5
- (void) initgroups (pw -> pw_name, pw -> pw_gid);
- ! #endif /* SYS5 */
- (void) setuid (pw -> pw_uid);
- ! #else /* DPOP */
- (void) setgid (pop_gid);
- #ifndef SYS5
- (void) initgroups (POPUID, pop_gid);
- ! #endif /* SYS5 */
- (void) setuid (pop_uid);
- ! #endif /* DPOP */
- #ifdef BPOP
- }
- ! #endif /* BPOP */
-
- #ifndef DPOP
- (void) sprintf (maildrop, "%s/%s",
- mmdfldir && *mmdfldir ? mmdfldir : pw -> pw_dir,
- mmdflfil && *mmdflfil ? mmdflfil : pw -> pw_name);
- ! #else /* DPOP */
- (void) strcpy (maildrop, pw -> bb_file);
- ! #endif /* DPOP */
-
- if (setupaux (guest) == NOTOK)
- return NOTOK;
- ***************
- *** 616,622 ****
- nmsgs, nmsgs != 1 ? "s" : "", Msgs[0].m_size);
- }
- else
- ! #endif POP2
- return respond (OK,
- nmsgs ? "maildrop has %d message%s (%d octets)" : "maildrop empty",
- nmsgs, nmsgs != 1 ? "s" : "", Msgs[0].m_size);
- --- 803,809 ----
- nmsgs, nmsgs != 1 ? "s" : "", Msgs[0].m_size);
- }
- else
- ! #endif /* POP2 */
- return respond (OK,
- nmsgs ? "maildrop has %d message%s (%d octets)" : "maildrop empty",
- nmsgs, nmsgs != 1 ? "s" : "", Msgs[0].m_size);
- ***************
- *** 633,639 ****
-
- #ifdef BPOP
- xtnded = 0;
- ! #endif BPOP
- if ((dp = readonly ? fopen (maildrop, "r") : lkfopen (maildrop, "r"))
- == NULL)
- switch (errno) {
- --- 820,826 ----
-
- #ifdef BPOP
- xtnded = 0;
- ! #endif /* BPOP */
- if ((dp = readonly ? fopen (maildrop, "r") : lkfopen (maildrop, "r"))
- == NULL)
- switch (errno) {
- ***************
- *** 877,883 ****
- respond ('#', "0 unable to change folders");
- return NOTOK;
- }
- ! #endif POP2
-
- static int list (vec)
- register char **vec;
- --- 1064,1070 ----
- respond ('#', "0 unable to change folders");
- return NOTOK;
- }
- ! #endif /* POP2 */
-
- static int list (vec)
- register char **vec;
- ***************
- *** 892,901 ****
-
- #ifndef BPOP
- return respond (OK, "%d %d", i, Msgs[i].m_size);
- ! #else BPOP
- return respond (OK, xtnded ? "%d %d %d" : "%d %d",
- ! i, Msgs[i].m_size, Msgs[i].m_id);
- ! #endif BPOP
- }
-
- (void) respond (OK, "%d message%s (%d octets)",
- --- 1079,1113 ----
-
- #ifndef BPOP
- return respond (OK, "%d %d", i, Msgs[i].m_size);
- ! #else /* BPOP */
- ! #ifdef MPOP
- ! if (nfs && !xtnded) {
- ! char *cp;
- !
- ! (void) fseek (dp, Msgs[i].m_start, 0);
- !
- ! switch (scan (dp, i, 0, nfs, 0, 0, NULLCP,
- ! (long) Msgs[i].m_size, 0)) {
- ! case SCNMSG:
- ! case SCNENC:
- ! case SCNERR:
- ! if (cp = index (scanl, '\n'))
- ! *cp = NULL;
- ! return respond (OK, "%d %d #%s",
- ! i, Msgs[i].m_size, scanl);
- !
- ! case SCNEOF:
- ! return respond (OK, "%d %d #%*d empty",
- ! i, Msgs[i].m_size, DMAXFOLDER, i);
- !
- ! default:
- ! break;
- ! }
- ! }
- ! #endif /* MPOP */
- return respond (OK, xtnded ? "%d %d %d" : "%d %d",
- ! i, Msgs[i].m_size, Msgs[i].m_id);
- ! #endif /* BPOP */
- }
-
- (void) respond (OK, "%d message%s (%d octets)",
- ***************
- *** 902,914 ****
- nmsgs - dmsgs, nmsgs - dmsgs != 1 ? "s" : "",
- Msgs[0].m_size);
- for (i = 1; i <= nmsgs; i++)
- ! if (!(Msgs[i].m_flags & MDELE))
- #ifndef BPOP
- multiline ("%d %d", i, Msgs[i].m_size);
- ! #else BPOP
- multiline (xtnded ? "%d %d %d" : "%d %d",
- ! i, Msgs[i].m_size, Msgs[i].m_id);
- ! #endif BPOP
- multiend ();
-
- return OK;
- --- 1114,1154 ----
- nmsgs - dmsgs, nmsgs - dmsgs != 1 ? "s" : "",
- Msgs[0].m_size);
- for (i = 1; i <= nmsgs; i++)
- ! if (!(Msgs[i].m_flags & MDELE)) {
- #ifndef BPOP
- multiline ("%d %d", i, Msgs[i].m_size);
- ! #else /* BPOP */
- ! #ifdef MPOP
- ! if (nfs && !xtnded) {
- ! char *cp;
- !
- ! (void) fseek (dp, Msgs[i].m_start, 0);
- !
- ! switch (scan (dp, i, 0, nfs, 0, 0, NULLCP,
- ! (long) Msgs[i].m_size, 0)) {
- ! case SCNMSG:
- ! case SCNENC:
- ! case SCNERR:
- ! if (cp = index (scanl, '\n'))
- ! *cp = NULL;
- ! multiline ("%d %d #%s",
- ! i, Msgs[i].m_size, scanl);
- ! continue;
- !
- ! case SCNEOF:
- ! multiline ("%d %d #%*d empty",
- ! i, Msgs[i].m_size, DMAXFOLDER, i);
- ! continue;
- !
- ! default:
- ! break;
- ! }
- ! }
- ! #endif /* MPOP */
- multiline (xtnded ? "%d %d %d" : "%d %d",
- ! i, Msgs[i].m_size, Msgs[i].m_id);
- ! #endif /* BPOP */
- ! }
- multiend ();
-
- return OK;
- ***************
- *** 945,951 ****
- fgets (buffer, sizeof buffer, dp) != NULL && pos < Msgs[i].m_stop;
- pos += (long) (cp - buffer + 1)) {
- if (*(cp = buffer + strlen (buffer) - 1) == '\n')
- ! *cp = NULL;
- multiline ("%s", buffer);
- }
- #ifdef POP2
- --- 1185,1191 ----
- fgets (buffer, sizeof buffer, dp) != NULL && pos < Msgs[i].m_stop;
- pos += (long) (cp - buffer + 1)) {
- if (*(cp = buffer + strlen (buffer) - 1) == '\n')
- ! *cp = 0;
- multiline ("%s", buffer);
- }
- #ifdef POP2
- ***************
- *** 1004,1009 ****
- --- 1244,1259 ----
-
- Msgs[0].m_last = lastseen;
-
- + #ifdef MPOP
- + #ifdef BPOP
- + if (nfs) {
- + if (scanl)
- + free (scanl), scanl = NULL;
- + free (nfs), nfs = NULL;
- + }
- + #endif
- + #endif /* MPOP */
- +
- return status (vec);
- }
-
- ***************
- *** 1024,1030 ****
- return respond (NOTOK, "no such message: \"%s\"", vec[1]);
- if (Msgs[i].m_flags & MDELE)
- return respond (NOTOK, "message %d is deleted", i);
- ! if ((j = atoi (vec[2])) <= 0)
- return respond (NOTOK, "bad number: \"%s\"", vec[2]);
-
- (void) respond (OK, vec[0]);
- --- 1274,1280 ----
- return respond (NOTOK, "no such message: \"%s\"", vec[1]);
- if (Msgs[i].m_flags & MDELE)
- return respond (NOTOK, "message %d is deleted", i);
- ! if ((j = atoi (vec[2])) < 0)
- return respond (NOTOK, "bad number: \"%s\"", vec[2]);
-
- (void) respond (OK, vec[0]);
- ***************
- *** 1034,1046 ****
- fgets (buffer, sizeof buffer, dp) != NULL && pos < Msgs[i].m_stop;
- pos += (long) (cp - buffer + 1)) {
- if (*(cp = buffer + strlen (buffer) - 1) == '\n')
- ! *cp = NULL;
- if (body) {
- if (lines++ >= j)
- break;
- }
- else
- ! if (*buffer == NULL)
- body++;
- multiline ("%s", buffer);
- }
- --- 1284,1296 ----
- fgets (buffer, sizeof buffer, dp) != NULL && pos < Msgs[i].m_stop;
- pos += (long) (cp - buffer + 1)) {
- if (*(cp = buffer + strlen (buffer) - 1) == '\n')
- ! *cp = 0;
- if (body) {
- if (lines++ >= j)
- break;
- }
- else
- ! if (*buffer == 0)
- body++;
- multiline ("%s", buffer);
- }
- ***************
- *** 1051,1056 ****
- --- 1301,1308 ----
-
- /* */
-
- + /* ARGSUSED */
- +
- static int last (vec)
- char **vec;
- {
- ***************
- *** 1069,1074 ****
- --- 1321,1330 ----
- return xtnd1 (vec);
- if (strcmp (vec[1], "x-bboards") == 0)
- return xtnd2 (vec);
- + #ifdef MPOP
- + if (strcmp (vec[1], "scan") == 0)
- + return xtnd3 (vec);
- + #endif /* MPOP */
-
- return respond (NOTOK, "unknown XTND command: \"%s\"", vec[1]);
- }
- ***************
- *** 1263,1272 ****
- padvise (NULLCP, LOG_DEBUG, "updated: \"%s\", 0%o, %d, %s",
- bb -> bb_name, bb -> bb_flags, bb -> bb_maxima, bb -> bb_date);
- }
- - #endif BPOP
-
- /* */
-
- static int quit (vec)
- char **vec;
- {
- --- 1519,1548 ----
- padvise (NULLCP, LOG_DEBUG, "updated: \"%s\", 0%o, %d, %s",
- bb -> bb_name, bb -> bb_flags, bb -> bb_maxima, bb -> bb_date);
- }
-
- /* */
-
- + #ifdef MPOP
- + static int xtnd3 (vec)
- + register char **vec;
- + {
- + if (vec[2] == NULL)
- + return respond (NOTOK, "too few arguments to XTND \"%s\"", vec[1]);
- + if ((_sc_width = atoi (vec[2])) < WIDTH / 2)
- + _sc_width = WIDTH / 2;
- + nfs = new_fs (NULLCP, vec[3], FORMAT);
- + if (scanl)
- + (void) free (scanl), scanl = NULL;
- +
- + return respond (OK, vec[1]);
- + }
- +
- + int sc_width () { return _sc_width; }
- + #endif /* MPOP */
- + #endif /* BPOP */
- +
- + /* */
- +
- static int quit (vec)
- char **vec;
- {
- ***************
- *** 1281,1287 ****
- #ifdef BPOP
- if (xtnded)
- return respond (OK, "%s signing off", server);
- ! #endif BPOP
-
- if (n == d)
- return respond (OK, "%s signing off (maildrop empty)", server);
- --- 1557,1563 ----
- #ifdef BPOP
- if (xtnded)
- return respond (OK, "%s signing off", server);
- ! #endif /* BPOP */
-
- if (n == d)
- return respond (OK, "%s signing off (maildrop empty)", server);
- ***************
- *** 1326,1335 ****
- map2[BUFSIZ];
- struct stat st;
-
- ! if ((dmsgs == 0 && rmsgs == 0) || (Msgs[0].m_flags & MREAD))
- return OK;
-
- - if(debug)padvise(NULLCP,LOG_DEBUG,"XXX: rmsgs=%d",rmsgs);
- if (fstat (fileno (dp), &st) == NOTOK)
- return respond (NOTOK, "unable to stat file");
- if (mtime != st.st_mtime)
- --- 1602,1613 ----
- map2[BUFSIZ];
- struct stat st;
-
- ! if(debug)padvise(NULLCP,LOG_DEBUG,"XXX: dmsgs=%d rmsgs=%d readonly=%d",
- ! dmsgs, rmsgs, Msgs[0].m_flags & MREAD);
- !
- ! if (dmsgs == 0 || (Msgs[0].m_flags & MREAD))
- return OK;
-
- if (fstat (fileno (dp), &st) == NOTOK)
- return respond (NOTOK, "unable to stat file");
- if (mtime != st.st_mtime)
- ***************
- *** 1339,1348 ****
- if (nmsgs == dmsgs) {
- #ifndef SYS5
- i = truncate (maildrop, 0);
- ! #else SYS5
- i = open (maildrop, O_WRONLY | O_TRUNC);
- if (i != NOTOK) (void) close (i);
- ! #endif SYS5
- (void) unlink (map_name (maildrop));/* XXX */
- if (i == NOTOK)
- return respond (NOTOK, "unable to zero %s", maildrop);
- --- 1617,1626 ----
- if (nmsgs == dmsgs) {
- #ifndef SYS5
- i = truncate (maildrop, 0);
- ! #else /* SYS5 */
- i = open (maildrop, O_WRONLY | O_TRUNC);
- if (i != NOTOK) (void) close (i);
- ! #endif /* SYS5 */
- (void) unlink (map_name (maildrop));/* XXX */
- if (i == NOTOK)
- return respond (NOTOK, "unable to zero %s", maildrop);
- ***************
- *** 1403,1413 ****
-
- for (i = 0; i < NVEC; i++) {
- while (isspace (*bp))
- ! *bp++ = NULL;
- ! if (*bp == NULL) {
- vec[i] = NULL;
- break;
- }
- vec[i] = bp;
- while (!isspace (*bp))
- bp++;
- --- 1681,1715 ----
-
- for (i = 0; i < NVEC; i++) {
- while (isspace (*bp))
- ! *bp++ = 0;
- ! if (*bp == 0) {
- vec[i] = NULL;
- break;
- }
- +
- + if (*bp == '"') {
- + for (vec[i] = ++bp; *bp != '\0' && *bp != '"'; bp++)
- + if (*bp == '\\') {
- + switch (*++bp) {
- + case 'n':
- + (void) strcpy (bp, bp + 1);
- + *--bp = '\n';
- + break;
- +
- + case '\\':
- + case '"':
- + (void) strcpy (bp - 1, bp);
- + /* and fall... */
- + default:
- + bp--;
- + break;
- + }
- + }
- + if (*bp == '"')
- + *bp++ = '\0';
- + continue;
- + }
- +
- vec[i] = bp;
- while (!isspace (*bp))
- bp++;
- ***************
- *** 1415,1425 ****
- i--;
- vec[NVEC] = NULL;
-
- ! if (*bp != NULL) {
- (void) respond (NOTOK, "too many arguments");
- return NULL;
- }
- ! if (*vec[0] == NULL) {
- (void) respond (NOTOK, "null command");
- return NULL;
- }
- --- 1717,1727 ----
- i--;
- vec[NVEC] = NULL;
-
- ! if (*bp != 0) {
- (void) respond (NOTOK, "too many arguments");
- return NULL;
- }
- ! if (*vec[0] == 0) {
- (void) respond (NOTOK, "null command");
- return NULL;
- }
- ***************
- *** 1531,1539 ****
- return NOTOK;
- if (c == EOF && p == s)
- return DONE;
- ! *p++ = NULL;
- ! if (debug)
- padvise (NULLCP, LOG_DEBUG, "<--- %s", s);
-
- return OK;
- }
- --- 1833,1847 ----
- return NOTOK;
- if (c == EOF && p == s)
- return DONE;
- ! if (debug) {
- ! if (*--p == '\n')
- ! *p = 0;
- padvise (NULLCP, LOG_DEBUG, "<--- %s", s);
- + if (*p == 0)
- + *p = '\n';
- + p++;
- + }
- + *p++ = 0;
-
- return OK;
- }
- ***************
- *** 1645,1652 ****
- {
- register int len,
- size;
- - long ld1,
- - ld2;
- register char *bp;
- char buffer[BUFSIZ];
- register struct drop *cp,
- --- 1953,1958 ----
- ***************
- *** 1654,1659 ****
- --- 1960,1971 ----
- *ep,
- *pp;
-
- + /* MTR: tsk, tsk, tsk... */
- + (void) fseek (fp, pos, 0);
- + if (fgets (buffer, sizeof buffer, fp)
- + && strcmp (buffer, mmdlm1) == 0)
- + return mbx_read (fp, pos, drops, noisy);
- +
- /* get drop storage */
- pp = (struct drop *) calloc ((unsigned) (len = MAXFOLDER), sizeof *dp);
-
- ***************
- *** 1666,1675 ****
- admonish (NULLCP, "unable to allocate drop storage");
- return NOTOK;
- }
- -
- - /* get sizes of msg delimiters */
- - ld1 = (long) strlen (mmdlm1);
- - ld2 = (long) strlen (mmdlm2);
-
- /* rewind drop file */
- (void) fseek (fp, pos, 0);
- --- 1978,1983 ----
- *** ../mh-6.7.2/support/pop/popwrd.c Thu Apr 5 16:02:50 1990
- --- support/pop/popwrd.c Mon Dec 14 16:20:56 1992
- ***************
- *** 1,7 ****
- /* popwrd.c - set password for a POP subscriber */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: popwrd.c,v 1.5 90/04/05 15:34:47 sources Exp $";
- ! #endif lint
-
- #include "../h/strings.h"
- #include "../zotnet/bboards.h"
- --- 1,7 ----
- /* popwrd.c - set password for a POP subscriber */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: popwrd.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/strings.h"
- #include "../zotnet/bboards.h"
- ***************
- *** 13,20 ****
- #include <sys/file.h>
- #ifdef SYS5
- #include <fcntl.h>
- ! #endif SYS5
-
-
- static char temp[] = "ptmp";
- static char home[BUFSIZ];
- --- 13,25 ----
- #include <sys/file.h>
- #ifdef SYS5
- #include <fcntl.h>
- ! #endif /* SYS5 */
-
- + #ifndef __STDC__
- + #ifdef SYS5
- + struct passwd *getpwnam();
- + #endif
- + #endif
-
- static char temp[] = "ptmp";
- static char home[BUFSIZ];
- ***************
- *** 85,91 ****
-
- #ifdef lint
- flags = 0;
- ! #endif lint
- for (insist = 0; insist < 2; insist++) {
- if (insist)
- printf ("Please use %s.\n",
- --- 90,96 ----
-
- #ifdef lint
- flags = 0;
- ! #endif /* lint */
- for (insist = 0; insist < 2; insist++) {
- if (insist)
- printf ("Please use %s.\n",
- ***************
- *** 155,161 ****
-
- #ifdef SIGTSTP
- (void) signal (SIGTSTP, SIG_IGN);
- ! #endif SIGTSTP
- if ((fp = fdopen (fd, "w")) == NULL) {
- fprintf (stderr, "fdopen loses.\n");
- (void) unlink (temp);
- --- 160,166 ----
-
- #ifdef SIGTSTP
- (void) signal (SIGTSTP, SIG_IGN);
- ! #endif /* SIGTSTP */
- if ((fp = fdopen (fd, "w")) == NULL) {
- fprintf (stderr, "fdopen loses.\n");
- (void) unlink (temp);
- *** ../mh-6.7.2/support/pop/syslog.c Thu Apr 5 16:02:51 1990
- --- support/pop/syslog.c Mon Dec 14 16:20:57 1992
- ***************
- *** 3,10 ****
- static char SccsId[] = "@(#)syslog.c 4.1 (Berkeley) 5/27/83";
- #endif
- #ifndef lint
- ! static char ident[] = "@(#)$Id: syslog.c,v 1.5 90/04/05 15:34:53 sources Exp $";
- ! #endif lint
-
- /*
- * SYSLOG -- print message on log file
- --- 3,10 ----
- static char SccsId[] = "@(#)syslog.c 4.1 (Berkeley) 5/27/83";
- #endif
- #ifndef lint
- ! static char ident[] = "@(#)$Id: syslog.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- /*
- * SYSLOG -- print message on log file
- ***************
- *** 27,33 ****
- --- 27,35 ----
-
- #define MAXLINE 1024 /* max message size */
- #define BUFSLOP 20 /* space to allow for "extra stuff" */
- + #ifndef NULL
- #define NULL 0 /* manifest */
- + #endif
-
- #define LOG_COOLIT LOG_LOCAL0 /* local syslog code */
- #define LOG_DGRAM LOG_LOCAL1 /* idem */
- ***************
- *** 34,44 ****
-
- #ifndef LOG_HOST
- #define LOG_HOST "localhost" /* host where syslogd is running */
- ! #endif LOG_HOST
-
- int LogFile = -1; /* fd for log */
- int LogStat = 0; /* status bits, set by initlog */
- ! char *LogTag = NULL; /* string to tag the entry with */
- int LogMask = LOG_DEBUG; /* lowest priority to be logged */
-
- struct sockaddr_in SyslogAddr;
- --- 36,46 ----
-
- #ifndef LOG_HOST
- #define LOG_HOST "localhost" /* host where syslogd is running */
- ! #endif /* LOG_HOST */
-
- int LogFile = -1; /* fd for log */
- int LogStat = 0; /* status bits, set by initlog */
- ! char *LogTag = (char *)NULL; /* string to tag the entry with */
- int LogMask = LOG_DEBUG; /* lowest priority to be logged */
-
- struct sockaddr_in SyslogAddr;
- ***************
- *** 81,91 ****
- }
- c = *f++;
- if (c != 'm') {
- ! #ifndef UCI
- *b++ = '%', *b++ = c, *b++ = '\0';
- ! #else UCI
- *b++ = '%', *b++ = c;
- ! #endif UCI
- continue;
- }
- if ((unsigned)errno > sys_nerr)
- --- 83,93 ----
- }
- c = *f++;
- if (c != 'm') {
- ! #ifndef notdef
- *b++ = '%', *b++ = c, *b++ = '\0';
- ! #else
- *b++ = '%', *b++ = c;
- ! #endif
- continue;
- }
- if ((unsigned)errno > sys_nerr)
- ***************
- *** 158,161 ****
- (void) close(LogFile);
- LogFile = -1;
- }
- ! #endif not BSD43
- --- 160,163 ----
- (void) close(LogFile);
- LogFile = -1;
- }
- ! #endif /* not BSD43 */
- *** ../mh-6.7.2/uip/ali.c Thu Apr 5 16:03:56 1990
- --- uip/ali.c Mon Dec 14 16:20:58 1992
- ***************
- *** 1,12 ****
- /* ali.c - the new ali */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: ali.c,v 1.3 90/04/05 15:03:38 sources Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include "../h/addrsbr.h"
- #include "../h/aliasbr.h"
- #include <stdio.h>
-
-
- #define NVEC 50 /* maximum number of names */
- --- 1,15 ----
- /* ali.c - the new ali */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: ali.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include "../h/addrsbr.h"
- #include "../h/aliasbr.h"
- #include <stdio.h>
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
-
- #define NVEC 50 /* maximum number of names */
- ***************
- *** 37,43 ****
- #define HELPSW 8
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 40,46 ----
- #define HELPSW 8
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 68,73 ****
- --- 71,79 ----
- *arguments[MAXARGS];
- struct aka *ak;
-
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- invo_name = r1bindex (argv[0], '/');
- mts_init (invo_name);
- if ((cp = m_find (invo_name)) != NULL) {
- ***************
- *** 132,140 ****
-
- if (!noalias) {
- (void) alias (AliasFile);
- ! if (cp = m_find ("Aliasfile")) /* allow Aliasfile: profile entry */
- ! if ((i = alias (cp)) != AK_OK)
- ! adios (NULLCP, "aliasing error in %s - %s", cp, akerror (i));
- }
-
-
- --- 138,153 ----
-
- if (!noalias) {
- (void) alias (AliasFile);
- ! if (cp = m_find ("Aliasfile")) { /* allow Aliasfile: profile entry */
- ! char *dp = NULL;
- !
- ! for (ap = brkstring(dp = getcpy(cp), " ", "\n"); ap && *ap; ap++)
- ! if ((i = alias (*ap)) != AK_OK)
- ! adios (NULLCP,
- ! "aliasing error in %s - %s", *ap, akerror (i));
- ! if (dp)
- ! free(dp);
- ! }
- }
-
-
- ***************
- *** 148,154 ****
- print_aka (akvalue (vec[i]), list, 0);
- else {
- if (inverted)
- ! adios (NULLCP, "usage: %s addresses ... (you forgot the addresses)",
- invo_name);
-
- for (ak = akahead; ak; ak = ak -> ak_next) {
- --- 161,168 ----
- print_aka (akvalue (vec[i]), list, 0);
- else {
- if (inverted)
- ! adios (NULLCP,
- ! "usage: %s -user addresses ... (you forgot the addresses)",
- invo_name);
-
- for (ak = akahead; ak; ak = ak -> ak_next) {
- ***************
- *** 191,197 ****
- pos += 2;
- }
-
- ! case NULL:
- break;
-
- default:
- --- 205,211 ----
- pos += 2;
- }
-
- ! case 0:
- break;
-
- default:
- ***************
- *** 244,251 ****
- --- 258,269 ----
- }
- mnfree (mp);
-
- + #ifdef notdef
- printf ("%s: ", s);
- print_aka (vp ? vp : s, list, pos += strlen (s) + 1);
- + #else
- + print_aka (vp ? vp : s, list, 0);
- + #endif
- if (vp)
- free (vp);
- }
- *** ../mh-6.7.2/uip/aliasbr.c Thu Apr 5 16:03:33 1990
- --- uip/aliasbr.c Mon Dec 14 16:20:59 1992
- ***************
- *** 1,7 ****
- /* aliasbr.c - new aliasing mechanism */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: aliasbr.c,v 1.7 90/04/05 14:59:03 sources Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include "../h/aliasbr.h"
- --- 1,7 ----
- /* aliasbr.c - new aliasing mechanism */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: aliasbr.c,v 1.13 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include "../h/aliasbr.h"
- ***************
- *** 26,33 ****
- --- 26,37 ----
- static add_aka();
- static int aleq(), addfile(), addgroup(), addmember(), addall();
-
- + #ifndef __STDC__
- + #ifdef SYS5
- struct passwd *getpwent ();
- struct group *getgrnam (), *getgrgid ();
- + #endif
- + #endif
-
- /* */
-
- ***************
- *** 110,116 ****
- else
- aliasent++;
-
- ! return (*aliasent == NULL || *aliasent == '*');
- }
-
- /* */
- --- 114,120 ----
- else
- aliasent++;
-
- ! return (*aliasent == 0 || *aliasent == '*');
- }
-
- /* */
- ***************
- *** 152,158 ****
- case ':': /* comment */
- case ';':
- case '#':
- ! case NULL:
- continue;
- }
-
- --- 156,162 ----
- case ':': /* comment */
- case ';':
- case '#':
- ! case 0:
- continue;
- }
-
- ***************
- *** 180,186 ****
- }
-
- switch (*(pp = scanp (ap))) {
- ! case NULL: /* EOL */
- (void) fclose (fp);
- return AK_ERROR;
-
- --- 184,190 ----
- }
-
- switch (*(pp = scanp (ap))) {
- ! case 0: /* EOL */
- (void) fclose (fp);
- return AK_ERROR;
-
- ***************
- *** 283,289 ****
- p = cp;
- while (!isspace (*cp) && *cp)
- cp++;
- ! *cp = NULL;
-
- return p;
- }
- --- 287,293 ----
- p = cp;
- while (!isspace (*cp) && *cp)
- cp++;
- ! *cp = 0;
-
- return p;
- }
- ***************
- *** 300,306 ****
- while (!isspace (*cp) && *cp && *cp != ':' && *cp != ';')
- cp++;
- *c = *cp;
- ! *cp++ = NULL;
- *a = cp;
-
- return p;
- --- 304,310 ----
- while (!isspace (*cp) && *cp && *cp != ':' && *cp != ';')
- cp++;
- *c = *cp;
- ! *cp++ = 0;
- *a = cp;
-
- return p;
- ***************
- *** 318,324 ****
-
- if ((fp = fopen (libpath (file), "r")) == NULL) {
- akerrst = file;
- ! return NULL;
- }
-
- while (fgets (buffer, sizeof buffer, fp) != NULL)
- --- 322,328 ----
-
- if ((fp = fopen (libpath (file), "r")) == NULL) {
- akerrst = file;
- ! return 0;
- }
-
- while (fgets (buffer, sizeof buffer, fp) != NULL)
- ***************
- *** 343,367 ****
- gr = getgrgid (atoi (grp));
- if (!gr) {
- akerrst = grp;
- ! return NULL;
- }
-
- ! #ifndef DBM
- if (homehead == NULL)
- init_pw ();
- ! #endif /* DBM */
-
- while (gp = *gr -> gr_mem++)
- ! #ifdef DBM
- {
- struct passwd *pw;
- ! #endif /* DBM */
- for (hm = homehead; hm; hm = hm -> h_next)
- if (!strcmp (hm -> h_name, gp)) {
- add_aka (ak, hm -> h_name);
- break;
- }
- ! #ifdef DBM
- if (pw = getpwnam(gp))
- {
- hmalloc(pw);
- --- 347,371 ----
- gr = getgrgid (atoi (grp));
- if (!gr) {
- akerrst = grp;
- ! return 0;
- }
-
- ! #ifndef DBMPWD
- if (homehead == NULL)
- init_pw ();
- ! #endif /* DBMPWD */
-
- while (gp = *gr -> gr_mem++)
- ! #ifdef DBMPWD
- {
- struct passwd *pw;
- ! #endif /* DBMPWD */
- for (hm = homehead; hm; hm = hm -> h_next)
- if (!strcmp (hm -> h_name, gp)) {
- add_aka (ak, hm -> h_name);
- break;
- }
- ! #ifdef DBMPWD
- if (pw = getpwnam(gp))
- {
- hmalloc(pw);
- ***************
- *** 368,374 ****
- add_aka (ak, gp);
- }
- }
- ! #endif /* DBM */
-
- return 1;
- }
- --- 372,378 ----
- add_aka (ak, gp);
- }
- }
- ! #endif /* DBMPWD */
-
- return 1;
- }
- ***************
- *** 391,402 ****
- }
- if (!gr) {
- akerrst = grp;
- ! return NULL;
- }
-
- ! #ifndef DBM
- if (homehead == NULL)
- ! #endif /* DBM */
- init_pw ();
-
- for (hm = homehead; hm; hm = hm -> h_next)
- --- 395,406 ----
- }
- if (!gr) {
- akerrst = grp;
- ! return 0;
- }
-
- ! #ifndef DBMPWD
- if (homehead == NULL)
- ! #endif /* DBMPWD */
- init_pw ();
-
- for (hm = homehead; hm; hm = hm -> h_next)
- ***************
- *** 411,426 ****
- static int addall (ak)
- register struct aka *ak;
- {
- ! int noshell = NoShell == NULLCP || *NoShell == NULL;
- register struct home *hm;
-
- ! #ifndef DBM
- if (homehead == NULL)
- ! #endif /* DBM */
- init_pw ();
- - #ifndef DBM
- if (Everyone < 0)
- - #endif /* DBM */
- Everyone = EVERYONE;
-
- for (hm = homehead; hm; hm = hm -> h_next)
- --- 415,428 ----
- static int addall (ak)
- register struct aka *ak;
- {
- ! int noshell = NoShell == NULLCP || *NoShell == 0;
- register struct home *hm;
-
- ! #ifndef DBMPWD
- if (homehead == NULL)
- ! #endif /* DBMPWD */
- init_pw ();
- if (Everyone < 0)
- Everyone = EVERYONE;
-
- for (hm = homehead; hm; hm = hm -> h_next)
- ***************
- *** 443,463 ****
- if (cp == NULL)
- cp = addrs;
- else
- ! if (*cp == NULL)
- return (cp = NULL);
-
- for (pp = cp; isspace (*pp); pp++)
- continue;
- ! if (*pp == NULL)
- return (cp = NULL);
- ! for (qp = pp; *qp != NULL && *qp != ','; qp++)
- continue;
- if (*qp == ',')
- ! *qp++ = NULL;
- for (cp = qp, qp--; qp > pp; qp--)
- ! if (*qp != NULL)
- if (isspace (*qp))
- ! *qp = NULL;
- else
- break;
-
- --- 445,465 ----
- if (cp == NULL)
- cp = addrs;
- else
- ! if (*cp == 0)
- return (cp = NULL);
-
- for (pp = cp; isspace (*pp); pp++)
- continue;
- ! if (*pp == 0)
- return (cp = NULL);
- ! for (qp = pp; *qp != 0 && *qp != ','; qp++)
- continue;
- if (*qp == ',')
- ! *qp++ = 0;
- for (cp = qp, qp--; qp > pp; qp--)
- ! if (*qp != 0)
- if (isspace (*qp))
- ! *qp = 0;
- else
- break;
-
- ***************
- *** 492,498 ****
-
- init_pw () {
- register struct passwd *pw;
- ! #ifdef DBM
- static int init;
-
- if (!init)
- --- 494,500 ----
-
- init_pw () {
- register struct passwd *pw;
- ! #ifdef DBMPWD
- static int init;
-
- if (!init)
- ***************
- *** 502,508 ****
- homehead=NULL;
- hometail=NULL;
- init++;
- ! #endif /* DBM */
-
- (void) setpwent ();
-
- --- 504,510 ----
- homehead=NULL;
- hometail=NULL;
- init++;
- ! #endif /* DBMPWD */
-
- (void) setpwent ();
-
- ***************
- *** 511,519 ****
- break;
-
- (void) endpwent ();
- ! #ifdef DBM
- }
- ! #endif /* DBM */
- }
-
- /* */
- --- 513,521 ----
- break;
-
- (void) endpwent ();
- ! #ifdef DBMPWD
- }
- ! #endif /* DBMPWD */
- }
-
- /* */
- ***************
- *** 555,561 ****
- p -> h_shell = getcpy (pw -> pw_shell);
- #ifdef BSD42
- p -> h_ngrps = 0;
- ! #endif BSD42
- p -> h_next = NULL;
- if (hometail != NULL)
- hometail -> h_next = p;
- --- 557,563 ----
- p -> h_shell = getcpy (pw -> pw_shell);
- #ifdef BSD42
- p -> h_ngrps = 0;
- ! #endif /* BSD42 */
- p -> h_next = NULL;
- if (hometail != NULL)
- hometail -> h_next = p;
- ***************
- *** 573,596 ****
- register char *name;
- {
- register struct home *hp;
- ! #ifdef DBM
- struct passwd *pw;
- char lname[32];
- char *c,*c1;
- ! #else /* DBM */
-
- if (homehead == NULL)
- init_pw ();
- ! #endif /* DBM */
-
- for (hp = homehead; hp; hp = hp -> h_next)
- if (uleq (name, hp -> h_name))
- return hp;
-
- ! #ifdef DBM /* The only place where there might be problems */
- /* This assumes that ALL usernames are kept in lowercase */
- for (c = name,c1 = lname; *c; c++, c1++)
- ! if (isupper(*c))
- *c1 = tolower(*c);
- else
- *c1 = *c;
- --- 575,598 ----
- register char *name;
- {
- register struct home *hp;
- ! #ifdef DBMPWD
- struct passwd *pw;
- char lname[32];
- char *c,*c1;
- ! #else /* DBMPWD */
-
- if (homehead == NULL)
- init_pw ();
- ! #endif /* DBMPWD */
-
- for (hp = homehead; hp; hp = hp -> h_next)
- if (uleq (name, hp -> h_name))
- return hp;
-
- ! #ifdef DBMPWD /* The only place where there might be problems */
- /* This assumes that ALL usernames are kept in lowercase */
- for (c = name,c1 = lname; *c; c++, c1++)
- ! if (isalpha(*c) && isupper(*c))
- *c1 = tolower(*c);
- else
- *c1 = *c;
- ***************
- *** 597,604 ****
- *c1 = NULL;
- if (pw = getpwnam(lname))
- return(hmalloc(pw));
- ! #endif /* DBM */
-
- return NULL;
- }
- ! #endif MMDFMTS
- --- 599,606 ----
- *c1 = NULL;
- if (pw = getpwnam(lname))
- return(hmalloc(pw));
- ! #endif /* DBMPWD */
-
- return NULL;
- }
- ! #endif /* MMDFMTS */
- *** ../mh-6.7.2/uip/anno.c Thu Apr 5 16:02:54 1990
- --- uip/anno.c Mon Dec 14 16:20:59 1992
- ***************
- *** 1,11 ****
- /* anno.c - annotate messages */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: anno.c,v 2.3 90/04/05 15:35:14 sources Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include <ctype.h>
- #include <stdio.h>
-
- static make_comp();
- /* */
- --- 1,14 ----
- /* anno.c - annotate messages */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: anno.c,v 2.6 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include <ctype.h>
- #include <stdio.h>
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
- static make_comp();
- /* */
- ***************
- *** 30,36 ****
- #define HELPSW 6
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 33,39 ----
- #define HELPSW 6
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 57,62 ****
- --- 60,68 ----
- *msgs[MAXARGS];
- struct msgs *mp;
-
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- invo_name = r1bindex (argv[0], '/');
- if ((cp = m_find (invo_name)) != NULL) {
- ap = brkstring (cp = getcpy (cp), " ", "\n");
- ***************
- *** 123,129 ****
- #ifdef UCI
- if (strcmp(invo_name, "fanno") == 0) /* ugh! */
- datesw = 0;
- ! #endif UCI
-
- /* */
-
- --- 129,135 ----
- #ifdef UCI
- if (strcmp(invo_name, "fanno") == 0) /* ugh! */
- datesw = 0;
- ! #endif /* UCI */
-
- /* */
-
- ***************
- *** 179,185 ****
- }
-
- if ((cp = *ap + strlen (*ap) - 1) > *ap && *cp == ':')
- ! *cp = NULL;
- if (strlen (*ap) == 0)
- adios (NULLCP, "null component name");
- if (**ap == '-')
- --- 185,191 ----
- }
-
- if ((cp = *ap + strlen (*ap) - 1) > *ap && *cp == ':')
- ! *cp = 0;
- if (strlen (*ap) == 0)
- adios (NULLCP, "null component name");
- if (**ap == '-')
- *** ../mh-6.7.2/uip/annosbr.c Thu Apr 5 16:02:53 1990
- --- uip/annosbr.c Mon Dec 14 16:21:00 1992
- ***************
- *** 1,7 ****
- /* annosbr.c - prepend annotation to messages */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: annosbr.c,v 2.4 90/04/05 15:35:09 sources Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include "../zotnet/tws.h"
- --- 1,7 ----
- /* annosbr.c - prepend annotation to messages */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: annosbr.c,v 2.5 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include "../zotnet/tws.h"
- *** ../mh-6.7.2/uip/ap.c Thu Apr 5 16:03:39 1990
- --- uip/ap.c Mon Dec 14 16:21:01 1992
- ***************
- *** 1,12 ****
- /* ap.c - parse addresses 822-style */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: ap.c,v 1.3 90/04/05 15:00:32 sources Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include "../h/addrsbr.h"
- #include "../h/formatsbr.h"
- #include <stdio.h>
-
-
- #define NADDRS 100
- --- 1,15 ----
- /* ap.c - parse addresses 822-style */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: ap.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include "../h/addrsbr.h"
- #include "../h/formatsbr.h"
- #include <stdio.h>
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
-
- #define NADDRS 100
- ***************
- *** 35,41 ****
- #define HELPSW 5
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 38,44 ----
- #define HELPSW 5
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 42,48 ****
-
- static struct format *fmt;
-
- ! static int dat[4];
-
- static int process();
- /* */
- --- 45,51 ----
-
- static struct format *fmt;
-
- ! static int dat[5];
-
- static int process();
- /* */
- ***************
- *** 67,72 ****
- --- 70,78 ----
- *arguments[MAXARGS],
- *addrs[NADDRS];
-
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- invo_name = r1bindex (argv[0], '/');
- mts_init (invo_name);
- if ((cp = m_find (invo_name)) != NULL) {
- ***************
- *** 141,147 ****
- width = WBUFSIZ;
- fmt_norm = normalize;
- (void) fmt_compile (nfs, &fmt);
- ! dat[0] = dat[1] = dat[2] = 0;
- dat[3] = width;
-
- for (addrp = 0; addrs[addrp]; addrp++)
- --- 147,153 ----
- width = WBUFSIZ;
- fmt_norm = normalize;
- (void) fmt_compile (nfs, &fmt);
- ! dat[0] = dat[1] = dat[2] = dat[4] = 0;
- dat[3] = width;
-
- for (addrp = 0; addrs[addrp]; addrp++)
- *** ../mh-6.7.2/uip/bbc.c Thu Apr 5 16:02:56 1990
- --- uip/bbc.c Mon Dec 14 09:10:30 1992
- ***************
- *** 1,6 ****
- /* bbc.c - ZOTnet BBoard checker */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: bbc.c,v 2.5 90/04/05 14:56:21 sources Exp $";
- #endif lint
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* bbc.c - ZOTnet BBoard checker */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: bbc.c,v 2.12 1992/12/14 17:10:25 jromine Exp $";
- #endif lint
-
- #include "../h/mh.h"
- ***************
- *** 24,29 ****
- --- 24,32 ----
- #include <sys/time.h>
- #include <sys/resource.h>
- #endif SIGTSTP
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
- #define RCFILE ".bbrc"
-
- ***************
- *** 130,136 ****
- #ifdef BPOP
- extern char response[];
-
- ! char *getusr (), **getip ();
- #endif BPOP
-
- int sigser (), action ();
- --- 133,140 ----
- #ifdef BPOP
- extern char response[];
-
- ! extern char *getusr ();
- ! static char **getip ();
- #endif BPOP
-
- int sigser (), action ();
- ***************
- *** 137,143 ****
- int hupser ();
- #ifdef SIGTSTP
- int tstpid;
- ! int tstpser ();
- #endif SIGTSTP
-
- static char *rcfile=NULL;
- --- 141,147 ----
- int hupser ();
- #ifdef SIGTSTP
- int tstpid;
- ! static int tstpser ();
- #endif SIGTSTP
-
- static char *rcfile=NULL;
- ***************
- *** 179,189 ****
- *bbs[NBB + 1],
- #endif UCL
- *vec[MAXARGS];
- -
- #ifdef UCL
- called_bbc = 1;
- bbp = 0;
- #endif UCL
- invo_name = r1bindex (argv[0], '/');
- #ifdef BPOP
- mts_init (invo_name);
- --- 183,196 ----
- *bbs[NBB + 1],
- #endif UCL
- *vec[MAXARGS];
- #ifdef UCL
- called_bbc = 1;
- bbp = 0;
- #endif UCL
- +
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- invo_name = r1bindex (argv[0], '/');
- #ifdef BPOP
- mts_init (invo_name);
- ***************
- *** 725,731 ****
- if ((cp = rc ? rc : getenv ("MHBBRC")) && *cp) {
- rcfile = path (cp, TFILE);
- if (*cp != '/')
- ! (void) putenv ("MHBBRC", rcfile);
- }
- else
- rcfile = concat (mypath, "/", RCFILE, NULLCP);
- --- 732,738 ----
- if ((cp = rc ? rc : getenv ("MHBBRC")) && *cp) {
- rcfile = path (cp, TFILE);
- if (*cp != '/')
- ! (void) m_putenv ("MHBBRC", rcfile);
- }
- else
- rcfile = concat (mypath, "/", RCFILE, NULLCP);
- ***************
- *** 810,822 ****
- --- 817,837 ----
- int sig;
- {
- int pid;
- + #if defined(BSD42) && !defined(WAITINT)
- union wait w;
- + #else
- + int w;
- + #endif
-
- rcend ();
-
- + #ifdef SVR4
- + waitpid(tstpid, &w, WUNTRACED);
- + #else
- while ((pid = wait3 (&w, WUNTRACED, (struct rusage *) 0)) != NOTOK
- && pid != tstpid)
- continue;
- + #endif
-
- (void) signal (SIGTSTP, SIG_DFL);
- #ifdef BSD42
- *** ../mh-6.7.2/uip/bbl.c Thu Apr 5 16:07:44 1990
- --- uip/bbl.c Tue Nov 3 16:39:27 1992
- ***************
- *** 1,6 ****
- /* bbl.c - ease the tasks of a BBleader */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: bbl.c,v 2.1 90/04/05 14:56:46 sources Exp $";
- #endif lint
-
- #include "../h/mh.h"
- --- 1,6 ----
- /* bbl.c - ease the tasks of a BBleader */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: bbl.c,v 2.4 1992/11/04 00:39:25 jromine Exp $";
- #endif lint
-
- #include "../h/mh.h"
- ***************
- *** 9,14 ****
- --- 9,17 ----
- #include <ctype.h>
- #include <pwd.h>
- #include <stdio.h>
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
- /* */
-
- ***************
- *** 50,58 ****
- static struct bboard *bb = NULL;
-
-
- #ifdef SYS5
- struct passwd *getpwnam (), *getpwuid ();
- ! #endif SYS5
-
- /* */
-
- --- 53,63 ----
- static struct bboard *bb = NULL;
-
-
- + #ifndef __STDC__
- #ifdef SYS5
- struct passwd *getpwnam (), *getpwuid ();
- ! #endif /* SYS5 */
- ! #endif
-
- /* */
-
- ***************
- *** 69,74 ****
- --- 74,82 ----
- *arguments[MAXARGS];
- struct passwd *pw;
-
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- invo_name = r1bindex (argv[0], '/');
- if ((cp = m_find (invo_name)) != NULL) {
- ap = brkstring (cp = getcpy (cp), " ", "\n");
- ***************
- *** 90,96 ****
- if (pw -> pw_uid != geteuid ())
- adios (NULLCP, "not running setuid to %s", bboards);
-
- ! current_folder = (cp = m_find (pfolder)) ? getcpy (cp) : defalt;
-
- /* */
-
- --- 98,105 ----
- if (pw -> pw_uid != geteuid ())
- adios (NULLCP, "not running setuid to %s", bboards);
-
- ! current_folder = ((cp = m_find (pfolder)) || (cp = m_find (inbox)))
- ! ? getcpy (cp) : defalt;
-
- /* */
-
- *** ../mh-6.7.2/uip/burst.c Thu Apr 5 16:03:40 1990
- --- uip/burst.c Mon Dec 14 16:21:01 1992
- ***************
- *** 1,12 ****
- /* burst.c - explode digests into individual messages */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: burst.c,v 1.3 90/04/05 15:00:42 sources Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-
- static cpybrst(), burst();
- /* */
- --- 1,15 ----
- /* burst.c - explode digests into individual messages */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: burst.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
- static cpybrst(), burst();
- /* */
- ***************
- *** 30,36 ****
- #define HELPSW 6
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 33,39 ----
- #define HELPSW 6
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 69,74 ****
- --- 72,80 ----
- *msgs[MAXARGS];
- struct smsg *smsgs;
-
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- invo_name = r1bindex (argv[0], '/');
- if ((cp = m_find (invo_name)) != NULL) {
- ap = brkstring (cp = getcpy (cp), " ", "\n");
- ***************
- *** 191,196 ****
- --- 197,203 ----
- msgp;
- register long pos;
- register char c,
- + cc,
- *msgnam;
- char buffer[BUFSIZ],
- f1[BUFSIZ],
- ***************
- *** 207,213 ****
-
- mode = fstat (fileno (in), &st) != NOTOK ? (st.st_mode & 0777)
- : m_gmprot ();
- ! for (msgp = 1, pos = 0L; msgp <= MAXFOLDER;) {
- while (fgets (buffer, sizeof buffer, in) != NULL
- && buffer[0] == '\n')
- pos += (long) strlen (buffer);
- --- 214,220 ----
-
- mode = fstat (fileno (in), &st) != NOTOK ? (st.st_mode & 0777)
- : m_gmprot ();
- ! for (msgp = 0, pos = 0L; msgp <= MAXFOLDER;) {
- while (fgets (buffer, sizeof buffer, in) != NULL
- && buffer[0] == '\n')
- pos += (long) strlen (buffer);
- ***************
- *** 216,227 ****
- (void) fseek (in, pos, 0);
- smsgs[msgp].s_start = pos;
-
- ! for (c = NULL;
- fgets (buffer, sizeof buffer, in) != NULL;
- c = buffer[0])
- if (strncmp (buffer, delim3, ld3) == 0
- ! && peekc (in) == '\n'
- ! && (msgp == 1 || c == '\n'))
- break;
- else
- pos += (long) strlen (buffer);
- --- 223,234 ----
- (void) fseek (in, pos, 0);
- smsgs[msgp].s_start = pos;
-
- ! for (c = 0;
- fgets (buffer, sizeof buffer, in) != NULL;
- c = buffer[0])
- if (strncmp (buffer, delim3, ld3) == 0
- ! && (msgp == 1 || c == '\n')
- ! && ((cc = peekc (in)) == '\n' || cc == EOF))
- break;
- else
- pos += (long) strlen (buffer);
- ***************
- *** 228,239 ****
-
- wasdlm = strncmp (buffer, delim3, ld3) == 0;
- if (smsgs[msgp].s_start != pos)
- ! smsgs[msgp++].s_stop = c == '\n' && wasdlm ? pos - 1 : pos;
- if (feof (in)) {
- if (wasdlm) {
- smsgs[msgp - 1].s_stop -= ((long) strlen (buffer) + 1);
- msgp++; /* fake "End of XXX Digest" */
- }
- break;
- }
- pos += (long) strlen (buffer);
- --- 235,248 ----
-
- wasdlm = strncmp (buffer, delim3, ld3) == 0;
- if (smsgs[msgp].s_start != pos)
- ! smsgs[msgp++].s_stop = (c == '\n' && wasdlm) ? pos - 1 : pos;
- if (feof (in)) {
- + #ifdef notdef
- if (wasdlm) {
- smsgs[msgp - 1].s_stop -= ((long) strlen (buffer) + 1);
- msgp++; /* fake "End of XXX Digest" */
- }
- + #endif
- break;
- }
- pos += (long) strlen (buffer);
- ***************
- *** 241,247 ****
-
- /* */
-
- ! switch (--msgp) { /* toss "End of XXX Digest" */
- case 0:
- adios (NULLCP, "burst() botch -- you lose big");
-
- --- 250,256 ----
-
- /* */
-
- ! switch (msgp--) { /* toss "End of XXX Digest" */
- case 0:
- adios (NULLCP, "burst() botch -- you lose big");
-
- ***************
- *** 254,264 ****
- default:
- if (verbosw)
- printf ("%d message%s exploded from digest %d\n",
- ! msgp - 1, msgp - 1 != 1 ? "s" : "", msgnum);
- ! if (msgp == 2) /* XXX */
- ! msgp++;
- break;
- }
-
- if ((mp = m_remsg (mp, 0, mp -> hghmsg + msgp)) == NULL)
- adios (NULLCP, "unable to allocate folder storage");
- --- 263,272 ----
- default:
- if (verbosw)
- printf ("%d message%s exploded from digest %d\n",
- ! msgp, msgp != 1 ? "s" : "", msgnum);
- break;
- }
- + /* msgp now contains the number of new msgs to be created */
-
- if ((mp = m_remsg (mp, 0, mp -> hghmsg + msgp)) == NULL)
- adios (NULLCP, "unable to allocate folder storage");
- ***************
- *** 265,278 ****
-
- /* */
-
- ! msgp--;
- ! j = mp -> hghmsg;
- ! mp -> hghmsg += msgp - 1;
- ! mp -> nummsg += msgp - 1;
- if (mp -> hghsel > msgnum)
- ! mp -> hghsel += msgp - 1;
-
- ! if (inplace && msgp > 1)
- for (i = mp -> hghmsg; j > msgnum; i--, j--) {
- (void) strcpy (f1, m_name (i));
- (void) strcpy (f2, m_name (j));
- --- 273,285 ----
-
- /* */
-
- ! j = mp -> hghmsg; /* old value */
- ! mp -> hghmsg += msgp;
- ! mp -> nummsg += msgp;
- if (mp -> hghsel > msgnum)
- ! mp -> hghsel += msgp;
-
- ! if (inplace)
- for (i = mp -> hghmsg; j > msgnum; i--, j--) {
- (void) strcpy (f1, m_name (i));
- (void) strcpy (f2, m_name (j));
- ***************
- *** 283,296 ****
- if (rename (f2, f1) == NOTOK)
- admonish (f1, "unable to rename %s to", f2);
- mp -> msgstats[i] = mp -> msgstats[j];
- ! mp -> msgstats[j] = NULL;
- mp -> msgflags |= SEQMOD;
- }
- }
-
- mp -> msgstats[msgnum] &= ~SELECTED;
- ! i = inplace ? msgnum + msgp - 1 : mp -> hghmsg;
- ! for (j = msgp; j >= (inplace ? 1 : 2); i--, j--) {
- (void) strcpy (f1, m_name (i));
- (void) strcpy (f2, m_scratch ("", invo_name));
- if (verbosw && i != msgnum)
- --- 290,303 ----
- if (rename (f2, f1) == NOTOK)
- admonish (f1, "unable to rename %s to", f2);
- mp -> msgstats[i] = mp -> msgstats[j];
- ! mp -> msgstats[j] = 0;
- mp -> msgflags |= SEQMOD;
- }
- }
-
- mp -> msgstats[msgnum] &= ~SELECTED;
- ! i = inplace ? msgnum + msgp : mp -> hghmsg; /* new hghmsg is hghmsg+msgp */
- ! for (j = msgp; j >= (inplace ? 0 : 1); i--, j--) {
- (void) strcpy (f1, m_name (i));
- (void) strcpy (f2, m_scratch ("", invo_name));
- if (verbosw && i != msgnum)
- ***************
- *** 337,343 ****
- state;
-
- for (state = S1; (c = fgetc (in)) != EOF && len > 0; len--) {
- ! if (c == NULL)
- continue;
- switch (state) {
- case S1:
- --- 344,350 ----
- state;
-
- for (state = S1; (c = fgetc (in)) != EOF && len > 0; len--) {
- ! if (c == 0)
- continue;
- switch (state) {
- case S1:
- *** ../mh-6.7.2/uip/comp.c Thu Apr 5 16:03:53 1990
- --- uip/comp.c Mon Dec 14 16:21:02 1992
- ***************
- *** 1,12 ****
- /* comp.c - compose a message */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: comp.c,v 1.3 90/04/05 15:03:07 sources Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-
- /* */
-
- --- 1,15 ----
- /* comp.c - compose a message */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: comp.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
- /* */
-
- ***************
- *** 42,48 ****
- "help", 4,
-
-
- ! NULL, NULL
- };
-
- /* */
- --- 45,51 ----
- "help", 4,
-
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 61,67 ****
- #define NEWSW 5
- "new", 0,
-
- ! NULL, NULL
- };
-
-
- --- 64,70 ----
- #define NEWSW 5
- "new", 0,
-
- ! NULL, 0
- };
-
-
- ***************
- *** 72,78 ****
- "list", 0,
- "refile", 0,
-
- ! NULL, NULL
- };
-
- /* */
- --- 75,81 ----
- "list", 0,
- "refile", 0,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 107,112 ****
- --- 110,118 ----
- struct msgs *mp = NULL;
- struct stat st;
-
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- invo_name = r1bindex (argv[0], '/');
- if ((cp = m_find (invo_name)) != NULL) {
- ap = brkstring (cp = getcpy (cp), " ", "\n");
- ***************
- *** 306,311 ****
-
- if (nwhat)
- done (0);
- ! (void) m_whatnow (ed, nedit, use, drft, NULLCP, 0, NULLMP, NULLCP, 0, cwd);
- done (1);
- }
- --- 312,317 ----
-
- if (nwhat)
- done (0);
- ! (void) what_now (ed, nedit, use, drft, NULLCP, 0, NULLMP, NULLCP, 0, cwd);
- done (1);
- }
- *** ../mh-6.7.2/uip/conflict.c Thu Apr 5 16:03:26 1990
- --- uip/conflict.c Mon Dec 14 16:07:55 1992
- ***************
- *** 1,7 ****
- /* conflict.c - the new conflict */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: conflict.c,v 2.2 90/04/05 14:57:02 sources Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include "../h/aliasbr.h"
- --- 1,7 ----
- /* conflict.c - the new conflict */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: conflict.c,v 2.9 1992/12/15 00:07:52 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include "../h/aliasbr.h"
- ***************
- *** 10,17 ****
- #include "../zotnet/mts.h"
- #include <grp.h>
- #include <pwd.h>
-
- -
- #define NDIRS 100
- #define NGRPS 100
-
- --- 10,19 ----
- #include "../zotnet/mts.h"
- #include <grp.h>
- #include <pwd.h>
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
- #define NDIRS 100
- #define NGRPS 100
-
- ***************
- *** 27,33 ****
- #define HELPSW 2
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 29,35 ----
- #define HELPSW 2
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 43,49 ****
- extern struct home *homehead;
-
-
- ! struct group *getgrent (),*getgrgid();
-
- /* */
-
- --- 45,53 ----
- extern struct home *homehead;
-
-
- ! #if !defined(__STDC__) && !defined(__stdc__) /* __stdc__ for convex */
- ! struct group *getgrent (), *getgrgid();
- ! #endif /* !__STDC__ */
-
- /* */
-
- ***************
- *** 60,65 ****
- --- 64,72 ----
- buf[80],
- *akv[50];
-
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- invo_name = r1bindex (argv[0], '/');
- m_foil (NULLCP);
- mts_init (invo_name);
- ***************
- *** 118,124 ****
- #ifdef UCI
- ldr_names ();
- ldr_ship ();
- ! #endif UCI
- maildrops ();
-
- done (0);
- --- 125,131 ----
- #ifdef UCI
- ldr_names ();
- ldr_ship ();
- ! #endif /* UCI */
- maildrops ();
-
- done (0);
- ***************
- *** 225,231 ****
- #ifdef BSD42
- else
- hm -> h_ngrps++;
- ! #endif BSD42
-
- for (dp = cp + 1; *dp; dp++)
- if (strcmp (*cp, *dp) == 0) {
- --- 232,238 ----
- #ifdef BSD42
- else
- hm -> h_ngrps++;
- ! #endif /* BSD42 */
-
- for (dp = cp + 1; *dp; dp++)
- if (strcmp (*cp, *dp) == 0) {
- ***************
- *** 245,251 ****
- hm -> h_name, hm -> h_ngrps, NGROUPS);
- hit++;
- }
- ! #endif BSD42
-
- if (!hit && out && !mail)
- fprintf (out, "all group members accounted for\n");
- --- 252,258 ----
- hm -> h_name, hm -> h_ngrps, NGROUPS);
- hit++;
- }
- ! #endif /* BSD42 */
-
- if (!hit && out && !mail)
- fprintf (out, "all group members accounted for\n");
- ***************
- *** 289,297 ****
- register int hit = 0;
- #ifdef SYS5DIR
- register struct dirent *dp;
- ! #else SYS5DIR
- register struct direct *dp;
- ! #endif SYS5DIR
- register DIR *dd = opendir (drop);
-
- if (!dd) {
- --- 296,304 ----
- register int hit = 0;
- #ifdef SYS5DIR
- register struct dirent *dp;
- ! #else /* SYS5DIR */
- register struct direct *dp;
- ! #endif /* SYS5DIR */
- register DIR *dd = opendir (drop);
-
- if (!dd) {
- ***************
- *** 438,445 ****
- while (*cp && !isspace (*cp))
- cp++;
- while (*cp && isspace (*cp))
- ! *cp++ = NULL;
- ! if (*cp == NULL)
- break;
- if (q < gl_ldr + MAXGLS)
- *q++ = cp;
- --- 445,452 ----
- while (*cp && !isspace (*cp))
- cp++;
- while (*cp && isspace (*cp))
- ! *cp++ = '\0';
- ! if (*cp == '\0')
- break;
- if (q < gl_ldr + MAXGLS)
- *q++ = cp;
- ***************
- *** 543,546 ****
- if (!hit && out && !mail)
- fprintf (out, "all group leaders accounted for\n");
- }
- ! #endif UCI
- --- 550,553 ----
- if (!hit && out && !mail)
- fprintf (out, "all group leaders accounted for\n");
- }
- ! #endif /* UCI */
- *** ../mh-6.7.2/uip/dist.c Thu Oct 29 15:02:18 1987
- --- uip/dist.c Mon Dec 14 16:21:03 1992
- ***************
- *** 1,9 ****
- --- 1,15 ----
- /* dist.c - re-distribute a message */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: dist.c,v 1.5 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
- /* */
-
- ***************
- *** 44,50 ****
- #define FILESW 13
- "file file", -4, /* interface from msh */
-
- ! NULL, NULL
- };
-
- /* */
- --- 50,56 ----
- #define FILESW 13
- "file file", -4, /* interface from msh */
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 61,67 ****
- #define NEWSW 4
- "new", 0,
-
- ! NULL, NULL
- };
-
-
- --- 67,73 ----
- #define NEWSW 4
- "new", 0,
-
- ! NULL, 0
- };
-
-
- ***************
- *** 71,77 ****
- "list", 0,
- "refile +folder", 0,
-
- ! NULL, NULL
- };
-
- /* */
- --- 77,83 ----
- "list", 0,
- "refile +folder", 0,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 109,114 ****
- --- 115,123 ----
- struct msgs *mp = NULL;
- struct stat st;
-
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- invo_name = r1bindex (argv[0], '/');
- if ((cp = m_find (invo_name)) != NULL) {
- ap = brkstring (cp = getcpy (cp), " ", "\n");
- ***************
- *** 307,313 ****
-
- if (nwhat)
- done (0);
- ! (void) m_whatnow (ed, nedit, NOUSE, drft, msgnam, 1, mp,
- anot ? "Resent" : NULLCP, inplace, cwd);
- done (1);
- }
- --- 316,322 ----
-
- if (nwhat)
- done (0);
- ! (void) what_now (ed, nedit, NOUSE, drft, msgnam, 1, mp,
- anot ? "Resent" : NULLCP, inplace, cwd);
- done (1);
- }
- *** ../mh-6.7.2/uip/distsbr.c Thu Apr 5 16:03:41 1990
- --- uip/distsbr.c Mon Dec 14 16:21:04 1992
- ***************
- *** 1,7 ****
- /* distsbr.c - routines to do additional "dist-style" processing */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: distsbr.c,v 1.3 90/04/05 15:00:50 sources Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include <ctype.h>
- --- 1,7 ----
- /* distsbr.c - routines to do additional "dist-style" processing */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: distsbr.c,v 1.4 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include <ctype.h>
- *** ../mh-6.7.2/uip/dp.c Thu Apr 5 16:03:41 1990
- --- uip/dp.c Mon Dec 14 16:21:05 1992
- ***************
- *** 1,12 ****
- /* dp.c - parse dates 822-style */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: dp.c,v 1.3 90/04/05 15:01:00 sources Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include "../h/formatsbr.h"
- #include "../zotnet/tws.h"
- #include <stdio.h>
-
-
- #define NDATES 100
- --- 1,15 ----
- /* dp.c - parse dates 822-style */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: dp.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include "../h/formatsbr.h"
- #include "../zotnet/tws.h"
- #include <stdio.h>
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
-
- #define NDATES 100
- ***************
- *** 30,36 ****
- #define HELPSW 3
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 33,39 ----
- #define HELPSW 3
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 37,43 ****
-
- static struct format *fmt;
-
- ! static int dat[4];
-
- static int process();
- /* */
- --- 40,46 ----
-
- static struct format *fmt;
-
- ! static int dat[5];
-
- static int process();
- /* */
- ***************
- *** 61,66 ****
- --- 64,72 ----
- *arguments[MAXARGS],
- *dates[NDATES];
-
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- invo_name = r1bindex (argv[0], '/');
- if ((cp = m_find (invo_name)) != NULL) {
- ap = brkstring (cp = getcpy (cp), " ", "\n");
- ***************
- *** 124,130 ****
- if (width > WBUFSIZ)
- width = WBUFSIZ;
- (void) fmt_compile (nfs, &fmt);
- ! dat[0] = dat[1] = dat[2] = 0;
- dat[3] = width;
-
- for (datep = 0; dates[datep]; datep++)
- --- 130,136 ----
- if (width > WBUFSIZ)
- width = WBUFSIZ;
- (void) fmt_compile (nfs, &fmt);
- ! dat[0] = dat[1] = dat[2] = dat[4] = 0;
- dat[3] = width;
-
- for (datep = 0; dates[datep]; datep++)
- *** ../mh-6.7.2/uip/dropsbr.c Fri Jan 25 15:02:47 1991
- --- uip/dropsbr.c Mon Dec 14 16:21:06 1992
- ***************
- *** 1,7 ****
- /* dropsbr.c - write to a mailbox */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: dropsbr.c,v 1.12 90/11/05 13:26:50 mh Exp $";
- ! #endif lint
-
- #include <stdio.h>
- #ifndef MMDFONLY
- --- 1,7 ----
- /* dropsbr.c - write to a mailbox */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: dropsbr.c,v 1.15 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include <stdio.h>
- #ifndef MMDFONLY
- ***************
- *** 8,18 ****
- #include "../h/mh.h"
- #include "../h/dropsbr.h"
- #include "../zotnet/mts.h"
- ! #else MMDFONLY
- #include "dropsbr.h"
- #include "strings.h"
- #include "mmdfonly.h"
- ! #endif MMDFONLY
- #include <errno.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- --- 8,18 ----
- #include "../h/mh.h"
- #include "../h/dropsbr.h"
- #include "../zotnet/mts.h"
- ! #else /* MMDFONLY */
- #include "dropsbr.h"
- #include "strings.h"
- #include "mmdfonly.h"
- ! #endif /* MMDFONLY */
- #include <errno.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- ***************
- *** 113,119 ****
-
- #ifdef BSD42
- case EWOULDBLOCK:
- ! #endif BSD42
- case ETXTBSY:
- j = errno;
- sleep (5);
- --- 113,119 ----
-
- #ifdef BSD42
- case EWOULDBLOCK:
- ! #endif /* BSD42 */
- case ETXTBSY:
- j = errno;
- sleep (5);
- ***************
- *** 163,169 ****
- if (lseek (fd, (long) (-count), 2) == (long) NOTOK
- || read (fd, ldelim, count) != count)
- return NOTOK;
- ! ldelim[count] = NULL;
-
- if (strcmp (ldelim, mmdlm2)
- && write (fd, "\n", 1) != 1
- --- 163,169 ----
- if (lseek (fd, (long) (-count), 2) == (long) NOTOK
- || read (fd, ldelim, count) != count)
- return NOTOK;
- ! ldelim[count] = 0;
-
- if (strcmp (ldelim, mmdlm2)
- && write (fd, "\n", 1) != 1
- ***************
- *** 395,401 ****
-
- for (j = 0; fgets (buffer, sizeof buffer, fp) != NULL; j++) {
- if (j != 0 && strncmp (buffer, "From ", 5) == 0) {
- ! (void) write (fd, ">", 1);
- size++;
- }
- i = strlen (buffer);
- --- 395,401 ----
-
- for (j = 0; fgets (buffer, sizeof buffer, fp) != NULL; j++) {
- if (j != 0 && strncmp (buffer, "From ", 5) == 0) {
- ! (void) write (md, ">", 1);
- size++;
- }
- i = strlen (buffer);
- ***************
- *** 682,688 ****
- if (read (fd, (char *) &tmpd, sizeof *dp) != sizeof *dp) {
- #ifdef notdef
- admonish (NULLCP, "%s: missing or partial index", file);
- ! #endif notdef
- return NOTOK;
- }
- #ifndef NTOHLSWAP
- --- 682,688 ----
- if (read (fd, (char *) &tmpd, sizeof *dp) != sizeof *dp) {
- #ifdef notdef
- admonish (NULLCP, "%s: missing or partial index", file);
- ! #endif /* notdef */
- return NOTOK;
- }
- #ifndef NTOHLSWAP
- *** ../mh-6.7.2/uip/fmtdump.c Thu Jan 23 16:04:50 1992
- --- uip/fmtdump.c Tue Nov 3 16:42:33 1992
- ***************
- *** 1,52 ****
- #ifndef lint
- ! static char ident[] = "@(#)$Id: fmtdump.c,v 1.7 1992/01/24 00:04:45 jromine Exp $";
- #endif
- - /*
- - * fmtdump - compile format file and dump out instructions
- - *
- - * usage:
- - *
- - * fmtdump [formatfile]
- - *
- - */
-
- #include "../h/mh.h"
- #include "../h/formatsbr.h"
- #include "../h/fmtcompile.h"
- #include <stdio.h>
-
- - static struct format *lvec[128];
- - static lused = 0;
-
- ! char *f_typestr(), *c_typestr();
- ! static int findlabel();
-
- ! void
- ! main(argc, argv)
- ! int argc;
- ! char **argv;
- {
- ! int n;
- ! struct format *fmt;
- ! char *file = "scan.format";
- ! char *str;
-
- ! if (argc > 1)
- ! file = argv[1];
-
- ! /* Read format file into memory */
- ! str = new_fs(file, 0, 0);
-
- ! /* Compile format */
- ! n = fmt_compile(str, &fmt);
-
- ! /* Dump format */
- ! dumpall(fmt);
- ! exit(0);
- }
-
- ! dumpall(fmth)
- ! register struct format *fmth;
- {
- int i;
- register struct format *fmt, *addr;
- --- 1,115 ----
- + /* fmtdump.c - compile format file and dump out instructions */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: fmtdump.c,v 1.10 1992/11/04 00:42:31 jromine Exp $";
- #endif
-
- #include "../h/mh.h"
- #include "../h/formatsbr.h"
- #include "../h/fmtcompile.h"
- + #include "../h/scansbr.h"
- #include <stdio.h>
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
-
- ! static struct swit switches[] = {
- ! #define FORMSW 0
- ! "form formatfile", 0,
- ! #define FMTSW 1
- ! "format string", 5,
-
- ! #define HELPSW 2
- ! "help", 4,
- !
- ! NULL, 0
- ! };
- !
- !
- ! /* for assignlabel */
- ! static struct format *lvec[128];
- ! static lused = 0;
- !
- ! static char *f_typestr(), *c_typestr();
- ! static void fmt_dump(), dumpone(), assignlabel(), litputs(), litputc();
- ! static int findlabel();
- !
- ! /* */
- !
- ! /* ARGSUSED */
- !
- ! main (argc, argv)
- ! int argc;
- ! char *argv[];
- {
- ! int ncomps;
- ! char *cp,
- ! *form = NULL,
- ! *format = NULL,
- ! buf[100],
- ! **ap,
- ! **argp,
- ! *nfs,
- ! *arguments[MAXARGS];
- ! struct format *fmt;
-
- ! #ifdef LOCALE
- ! setlocale(LC_ALL, "");
- ! #endif
- ! invo_name = r1bindex (argv[0], '/');
- ! if ((cp = m_find (invo_name)) != NULL) {
- ! ap = brkstring (cp = getcpy (cp), " ", "\n");
- ! ap = copyip (ap, arguments);
- ! }
- ! else
- ! ap = arguments;
- ! (void) copyip (argv + 1, ap);
- ! argp = arguments;
-
- ! /* */
-
- ! while (cp = *argp++) {
- ! if (*cp == '-')
- ! switch (smatch (++cp, switches)) {
- ! case AMBIGSW:
- ! ambigsw (cp, switches);
- ! done (1);
- ! case UNKWNSW:
- ! adios (NULLCP, "-%s unknown", cp);
- ! case HELPSW:
- ! (void) sprintf (buf, "%s [switches]",
- ! invo_name);
- ! help (buf, switches);
- ! done (1);
-
- ! case FORMSW:
- ! if (!(form = *argp++) || *form == '-')
- ! adios (NULLCP, "missing argument to %s", argp[-2]);
- ! format = NULL;
- ! continue;
- ! case FMTSW:
- ! if (!(format = *argp++) || *format == '-')
- ! adios (NULLCP, "missing argument to %s", argp[-2]);
- ! form = NULL;
- ! continue;
- !
- ! }
- ! if (form)
- ! adios (NULLCP, "only one form at a time!");
- ! else
- ! form = cp;
- ! }
- !
- ! nfs = new_fs (form, format, FORMAT); /* must be before chdir() */
- ! ncomps = fmt_compile(nfs, &fmt);
- !
- ! fmt_dump(fmt);
- ! done(0);
- }
-
- ! static void
- ! fmt_dump (fmth)
- ! register struct format *fmth;
- {
- int i;
- register struct format *fmt, *addr;
- ***************
- *** 78,83 ****
- --- 141,147 ----
- }
- }
-
- + static void
- dumpone(fmt)
- register struct format *fmt;
- {
- ***************
- *** 202,208 ****
- case FT_IF_S_NULL:
- case FT_IF_MATCH:
- case FT_IF_AMATCH:
- ! printf(" false, goto");
- case FT_GOTO:
- i = findlabel(fmt + fmt->f_skip);
- printf(" L%d", i);
- --- 266,272 ----
- case FT_IF_S_NULL:
- case FT_IF_MATCH:
- case FT_IF_AMATCH:
- ! printf(" continue else goto");
- case FT_GOTO:
- i = findlabel(fmt + fmt->f_skip);
- printf(" L%d", i);
- ***************
- *** 212,218 ****
- case FT_IF_V_NE:
- case FT_IF_V_GT:
- i = findlabel(fmt + fmt->f_skip);
- ! printf(" %d goto L%d", fmt->f_value, i);
- break;
-
- case FT_V_EQ:
- --- 276,282 ----
- case FT_IF_V_NE:
- case FT_IF_V_GT:
- i = findlabel(fmt + fmt->f_skip);
- ! printf(" %d continue else goto L%d", fmt->f_value, i);
- break;
-
- case FT_V_EQ:
- ***************
- *** 222,227 ****
- --- 286,292 ----
- case FT_LV_PLUS_L:
- case FT_LV_MINUS_L:
- case FT_LV_DIVIDE_L:
- + case FT_LV_MODULO_L:
- printf(" value %d", fmt->f_value);
- break;
-
- ***************
- *** 258,263 ****
- --- 323,329 ----
- return(-1);
- }
-
- + static void
- assignlabel(addr)
- register struct format *addr;
- {
- ***************
- *** 264,270 ****
- lvec[lused++] = addr;
- }
-
- ! char *
- f_typestr(t)
- int t;
- {
- --- 330,336 ----
- lvec[lused++] = addr;
- }
-
- ! static char *
- f_typestr(t)
- int t;
- {
- ***************
- *** 297,302 ****
- --- 363,369 ----
- case FT_LV_PLUS_L: return("LV_PLUS_L");
- case FT_LV_MINUS_L: return("LV_MINUS_L");
- case FT_LV_DIVIDE_L: return("LV_DIVIDE_L");
- + case FT_LV_MODULO_L: return("LV_MODULO_L");
- case FT_LV_CHAR_LEFT: return("LV_CHAR_LEFT");
- case FT_LS_MONTH: return("LS_MONTH");
- case FT_LS_LMONTH: return("LS_LMONTH");
- ***************
- *** 372,378 ****
- strcat(buf, "|"); \
- strcat(buf, s); }
-
- ! char *
- c_typestr(t)
- int t;
- {
- --- 439,445 ----
- strcat(buf, "|"); \
- strcat(buf, s); }
-
- ! static char *
- c_typestr(t)
- int t;
- {
- ***************
- *** 393,398 ****
- --- 460,466 ----
- #undef FNORD
- }
-
- + static void
- litputs(s)
- register char *s;
- {
- ***************
- *** 405,410 ****
- --- 473,479 ----
- fputs("<nil>", stdout);
- }
-
- + static void
- litputc(c)
- char c;
- {
- *** ../mh-6.7.2/uip/folder.c Mon Jan 14 16:49:55 1991
- --- uip/folder.c Mon Dec 14 16:21:08 1992
- ***************
- *** 1,12 ****
- /* folder(s).c - report on folders */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: folder.c,v 2.4 90/04/05 14:56:54 sources Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include "../h/local.h"
- #include <errno.h>
- #include <stdio.h>
-
- static dodir(), addir(), addfold(), dother();
- static int pfold(), sfold(), compare();
- --- 1,15 ----
- /* folder(s).c - report on folders */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: folder.c,v 2.9 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include "../h/local.h"
- #include <errno.h>
- #include <stdio.h>
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
- static dodir(), addir(), addfold(), dother();
- static int pfold(), sfold(), compare();
- ***************
- *** 48,54 ****
- #define PRNTSW 13
- "print", 0,
- #define NPRNTSW 14
- ! "noprint", 0,
- #define LISTSW 15
- "list", 0,
- #define NLISTSW 16
- --- 51,57 ----
- #define PRNTSW 13
- "print", 0,
- #define NPRNTSW 14
- ! "noprint", -4,
- #define LISTSW 15
- "list", 0,
- #define NLISTSW 16
- ***************
- *** 61,67 ****
- #define HELPSW 19
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 64,70 ----
- #define HELPSW 19
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 108,113 ****
- --- 111,119 ----
- *arguments[MAXARGS];
- struct stat st;
-
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- invo_name = r1bindex (argv[0], '/');
- if (argv[0][strlen (argv[0]) - 1] == 's')
- all++;
- ***************
- *** 201,210 ****
- --- 207,218 ----
-
- case PUSHSW:
- pushsw++;
- + listsw++;
- popsw = 0;
- continue;
- case POPSW:
- popsw++;
- + listsw++;
- pushsw = 0;
- continue;
- }
- ***************
- *** 267,273 ****
- m_update ();
- argfolder = NULL;
- }
- ! if (pushsw || popsw || listsw) {
- printf ("%s", argfolder ? argfolder : m_getfolder ());
- if (cp = m_find (stack)) {
- for (ap = brkstring (dp = getcpy (cp), " ", "\n"); *ap; ap++)
- --- 275,281 ----
- m_update ();
- argfolder = NULL;
- }
- ! if (listsw) {
- printf ("%s", argfolder ? argfolder : m_getfolder ());
- if (cp = m_find (stack)) {
- for (ap = brkstring (dp = getcpy (cp), " ", "\n"); *ap; ap++)
- ***************
- *** 284,300 ****
-
- if (all) {
- fheader = 0;
- ! if (argfolder || msg) {
- ! (void) strcpy (folder, argfolder ? argfolder : m_getfolder ());
- !
- ! if (pfold (argfolder, msg) && argfolder) {
- m_replace (pfolder, argfolder);
- m_update ();
- }
- ! if (!frecurse) /* counter-intuitive */
- ! dodir (folder);
- }
- else {
- dother ();
-
- (void) strcpy (folder, (cp = m_find (pfolder)) ? cp : "");
- --- 292,309 ----
-
- if (all) {
- fheader = 0;
- ! if (argfolder) {
- ! (void) strcpy (folder, argfolder);
- ! if (pfold (argfolder, msg)) {
- m_replace (pfolder, argfolder);
- m_update ();
- }
- ! if (!frecurse) /* recurse not done in pfold(), */
- ! dodir (folder); /* so just list all level-1 sub-folders */
- }
- else {
- + if (msg)
- + admonish (NULLCP, "no folder given for message %s", msg);
- dother ();
-
- (void) strcpy (folder, (cp = m_find (pfolder)) ? cp : "");
- ***************
- *** 511,524 ****
- struct stat st;
- #ifdef SYS5DIR
- register struct dirent *dp;
- ! #else SYS5DIR
- register struct direct *dp;
- ! #endif SYS5DIR
- register DIR * dd;
-
- cp = name + strlen (name);
- *cp++ = '/';
- ! *cp = NULL;
-
- base = strcmp (name, "./") ? name : name + 2;/* hack */
-
- --- 520,533 ----
- struct stat st;
- #ifdef SYS5DIR
- register struct dirent *dp;
- ! #else /* SYS5DIR */
- register struct direct *dp;
- ! #endif /* SYS5DIR */
- register DIR * dd;
-
- cp = name + strlen (name);
- *cp++ = '/';
- ! *cp = '\0';
-
- base = strcmp (name, "./") ? name : name + 2;/* hack */
-
- ***************
- *** 530,538 ****
- if (strcmp (dp -> d_name, ".") && strcmp (dp -> d_name, "..")) {
- #ifdef SYS5DIR
- if (cp + dp -> d_reclen + 2 >= name + BUFSIZ)
- ! #else SYS5DIR
- if (cp + strlen (dp -> d_name) + 2 >= name + BUFSIZ)
- ! #endif SYS5DIR
- continue;
- (void) strcpy (cp, dp -> d_name);
- if (stat (name, &st) != NOTOK && (st.st_mode & S_IFMT) == S_IFDIR)
- --- 539,547 ----
- if (strcmp (dp -> d_name, ".") && strcmp (dp -> d_name, "..")) {
- #ifdef SYS5DIR
- if (cp + dp -> d_reclen + 2 >= name + BUFSIZ)
- ! #else /* SYS5DIR */
- if (cp + strlen (dp -> d_name) + 2 >= name + BUFSIZ)
- ! #endif /* SYS5DIR */
- continue;
- (void) strcpy (cp, dp -> d_name);
- if (stat (name, &st) != NOTOK && (st.st_mode & S_IFMT) == S_IFDIR)
- ***************
- *** 540,546 ****
- }
- closedir (dd);
-
- ! *--cp = NULL;
- }
-
- /* */
- --- 549,555 ----
- }
- closedir (dd);
-
- ! *--cp = '\0';
- }
-
- /* */
- *** ../mh-6.7.2/uip/forw.c Thu Apr 5 16:03:37 1990
- --- uip/forw.c Mon Dec 14 16:21:09 1992
- ***************
- *** 1,7 ****
- /* forw.c - forward messages */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: forw.c,v 1.6 90/04/05 14:59:50 sources Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include "../h/formatsbr.h"
- --- 1,7 ----
- /* forw.c - forward messages */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: forw.c,v 1.13 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include "../h/formatsbr.h"
- ***************
- *** 9,18 ****
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-
-
- ! #define IFMT "digest-issue-%s"
- ! #define VFMT "digest-volume-%s"
-
- static mhl_draft(), copy_draft(), build_form();
- /* */
- --- 9,26 ----
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
- + #ifndef MIME
- + #define MIMEminc(a) (a)
- + #else /* MIME */
- + #define MIMEminc(a) 0
- + #endif /* MIME */
-
- ! #define IFORMAT "digest-issue-%s"
- ! #define VFORMAT "digest-volume-%s"
-
- static mhl_draft(), copy_draft(), build_form();
- /* */
- ***************
- *** 50,84 ****
- #define NINPLSW 12
- "noinplace", 0,
-
- ! #define DGSTSW 13
- "digest list", 0,
- ! #define ISSUESW 14
- "issue number", 0,
- ! #define VOLUMSW 15
- "volume number", 0,
-
- ! #define WHATSW 16
- "whatnowproc program", 0,
- ! #define NWHATSW 17
- "nowhatnowproc", 0,
-
- ! #define HELPSW 18
- "help", 4,
-
- ! #define FILESW 19
- "file file", -4, /* interface from msh */
-
- ! #define DASHSW 20
- "dashmunging", -4, /* interface to mhl */
- ! #define NDASHSW 21
- "nodashmunging", -6,
-
- #ifdef MHE
- ! #define BILDSW 22
- "build", -5, /* interface from mhe */
- ! #endif MHE
-
- ! NULL, NULL
- };
-
- /* */
- --- 58,97 ----
- #define NINPLSW 12
- "noinplace", 0,
-
- ! #define MIMESW 13
- ! "mime", MIMEminc(-4),
- ! #define NMIMESW 14
- ! "nomime", MIMEminc(-6),
- !
- ! #define DGSTSW 15
- "digest list", 0,
- ! #define ISSUESW 16
- "issue number", 0,
- ! #define VOLUMSW 17
- "volume number", 0,
-
- ! #define WHATSW 18
- "whatnowproc program", 0,
- ! #define NWHATSW 19
- "nowhatnowproc", 0,
-
- ! #define HELPSW 20
- "help", 4,
-
- ! #define FILESW 21
- "file file", -4, /* interface from msh */
-
- ! #define DASHSW 22
- "dashmunging", -4, /* interface to mhl */
- ! #define NDASHSW 23
- "nodashmunging", -6,
-
- #ifdef MHE
- ! #define BILDSW 24
- "build", -5, /* interface from mhe */
- ! #endif /* MHE */
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 95,101 ****
- #define NEWSW 4
- "new", 0,
-
- ! NULL, NULL
- };
-
-
- --- 108,114 ----
- #define NEWSW 4
- "new", 0,
-
- ! NULL, 0
- };
-
-
- ***************
- *** 105,111 ****
- "list", 0,
- "refile +folder", 0,
-
- ! NULL, NULL
- };
-
- /* */
- --- 118,124 ----
- "list", 0,
- "refile +folder", 0,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 133,144 ****
- int msgp = 0,
- anot = 0,
- inplace = 0,
- issue = 0,
- volume = 0,
- dashflg = 1,
- #ifdef MHE
- buildsw = 0,
- ! #endif MHE
- nedit = 0,
- nwhat = 0,
- i,
- --- 146,158 ----
- int msgp = 0,
- anot = 0,
- inplace = 0,
- + mime = 0,
- issue = 0,
- volume = 0,
- dashflg = 1,
- #ifdef MHE
- buildsw = 0,
- ! #endif /* MHE */
- nedit = 0,
- nwhat = 0,
- i,
- ***************
- *** 165,170 ****
- --- 179,187 ----
- *msgs[MAXARGS];
- struct stat st;
-
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- invo_name = r1bindex (argv[0], '/');
- if ((cp = m_find (invo_name)) != NULL) {
- ap = brkstring (cp = getcpy (cp), " ", "\n");
- ***************
- *** 215,221 ****
- #ifdef MHE
- case BILDSW:
- buildsw++; /* fall... */
- ! #endif MHE
- case NWHATSW:
- nwhat++;
- continue;
- --- 232,238 ----
- #ifdef MHE
- case BILDSW:
- buildsw++; /* fall... */
- ! #endif /* MHE */
- case NWHATSW:
- nwhat++;
- continue;
- ***************
- *** 231,236 ****
- --- 248,254 ----
- if (!(cp = *argp++) || *cp == '-')
- adios (NULLCP, "missing argument to %s", argp[-2]);
- filter = getcpy (libpath (cp));
- + mime = 0;
- continue;
- case FORMSW:
- if (!(form = *argp++) || *form == '-')
- ***************
- *** 251,259 ****
- --- 269,288 ----
- inplace = 0;
- continue;
-
- + case MIMESW:
- + #ifdef MIME
- + mime++;
- + filter = NULL;
- + #endif
- + continue;
- + case NMIMESW:
- + mime = 0;
- + continue;
- +
- case DGSTSW:
- if (!(digest = *argp++) || *digest == '-')
- adios (NULLCP, "missing argument to %s", argp[-2]);
- + mime = 0;
- continue;
- case ISSUESW:
- if (!(cp = *argp++) || *cp == '-')
- ***************
- *** 317,327 ****
- #ifndef MHE
- (void) strcpy (drft, m_draft (dfolder, dmsg, NOUSE, &isdf));
- if (stat (drft, &st) != NOTOK) {
- ! #else MHE
- (void) strcpy (drft, buildsw ? m_maildir ("draft")
- : m_draft (dfolder, NULLCP, NOUSE, &isdf));
- if (!buildsw && stat (drft, &st) != NOTOK) {
- ! #endif MHE
- printf ("Draft \"%s\" exists (%ld bytes).", drft, st.st_size);
- for (i = LISTDSW; i != YESW;) {
- if (!(argp = getans ("\nDisposition? ", isdf ? aqrnl : aqrl)))
- --- 346,356 ----
- #ifndef MHE
- (void) strcpy (drft, m_draft (dfolder, dmsg, NOUSE, &isdf));
- if (stat (drft, &st) != NOTOK) {
- ! #else /* MHE */
- (void) strcpy (drft, buildsw ? m_maildir ("draft")
- : m_draft (dfolder, NULLCP, NOUSE, &isdf));
- if (!buildsw && stat (drft, &st) != NOTOK) {
- ! #endif /* MHE */
- printf ("Draft \"%s\" exists (%ld bytes).", drft, st.st_size);
- for (i = LISTDSW; i != YESW;) {
- if (!(argp = getans ("\nDisposition? ", isdf ? aqrnl : aqrl)))
- ***************
- *** 381,387 ****
-
- if (digest) {
- if (issue == 0) {
- ! (void) sprintf (buf, IFMT, digest);
- if (volume == 0
- && (cp = m_find (buf))
- && ((issue = atoi (cp)) < 0))
- --- 410,416 ----
-
- if (digest) {
- if (issue == 0) {
- ! (void) sprintf (buf, IFORMAT, digest);
- if (volume == 0
- && (cp = m_find (buf))
- && ((issue = atoi (cp)) < 0))
- ***************
- *** 389,395 ****
- issue++;
- }
- if (volume == 0)
- ! (void) sprintf (buf, VFMT, digest);
- if ((cp = m_find (buf)) == NULL || (volume = atoi (cp)) <= 0)
- volume = 1;
- if (!form)
- --- 418,424 ----
- issue++;
- }
- if (volume == 0)
- ! (void) sprintf (buf, VFORMAT, digest);
- if ((cp = m_find (buf)) == NULL || (volume = atoi (cp)) <= 0)
- volume = 1;
- if (!form)
- ***************
- *** 427,440 ****
- if (filter)
- mhl_draft (out, digest, volume, issue, drft, filter, dashflg);
- else
- ! copy_draft (out, digest, drft, volume, issue);
- (void) close (out);
-
- if (digest) {
- ! (void) sprintf (buf, IFMT, digest);
- (void) sprintf (value, "%d", issue);
- m_replace (buf, getcpy (value));
- ! (void) sprintf (buf, VFMT, digest);
- (void) sprintf (value, "%d", volume);
- m_replace (buf, getcpy (value));
- }
- --- 456,469 ----
- if (filter)
- mhl_draft (out, digest, volume, issue, drft, filter, dashflg);
- else
- ! copy_draft (out, digest, drft, volume, issue, mime);
- (void) close (out);
-
- if (digest) {
- ! (void) sprintf (buf, IFORMAT, digest);
- (void) sprintf (value, "%d", issue);
- m_replace (buf, getcpy (value));
- ! (void) sprintf (buf, VFORMAT, digest);
- (void) sprintf (value, "%d", volume);
- m_replace (buf, getcpy (value));
- }
- ***************
- *** 448,454 ****
- edit_it: ;
- if (nwhat)
- done (0);
- ! (void) m_whatnow (ed, nedit, NOUSE, drft, NULLCP, 0, mp,
- anot ? "Forwarded" : NULLCP, inplace, cwd);
- done (1);
- }
- --- 477,483 ----
- edit_it: ;
- if (nwhat)
- done (0);
- ! (void) what_now (ed, nedit, NOUSE, drft, NULLCP, 0, mp,
- anot ? "Forwarded" : NULLCP, inplace, cwd);
- done (1);
- }
- ***************
- *** 525,534 ****
-
- /* */
-
- ! static copy_draft (out, digest, file, volume, issue)
- int out,
- volume,
- ! issue;
- register char *digest,
- *file;
- {
- --- 554,564 ----
-
- /* */
-
- ! static copy_draft (out, digest, file, volume, issue, mime)
- int out,
- volume,
- ! issue,
- ! mime;
- register char *digest,
- *file;
- {
- ***************
- *** 539,544 ****
- --- 569,589 ----
- *msgnam;
- char buffer[BUFSIZ];
-
- + #ifdef MIME
- + if (mime) {
- + (void) sprintf (buffer, "#forw [] +%s", mp -> foldpath);
- + (void) write (out, buffer, strlen (buffer));
- + for (msgnum = mp -> lowsel; msgnum <= mp -> hghsel; msgnum++)
- + if (mp -> msgstats[msgnum] & SELECTED) {
- + (void) sprintf (buffer, " %s", m_name (msgnum));
- + (void) write (out, buffer, strlen (buffer));
- + }
- + (void) write (out, "\n", 1);
- +
- + return;
- + }
- + #endif /* MIME */
- +
- msgcnt = 1;
- for (msgnum = mp -> lowsel; msgnum <= mp -> hghsel; msgnum++)
- if (mp -> msgstats[msgnum] & SELECTED) {
- ***************
- *** 580,586 ****
- for (bp = buffer + i; i > 1; i--)
- *bp++ = '*';
- *bp++ = '\n';
- ! *bp = NULL;
- (void) write (out, buffer, strlen (buffer));
- }
- }
- --- 625,631 ----
- for (bp = buffer + i; i > 1; i--)
- *bp++ = '*';
- *bp++ = '\n';
- ! *bp = 0;
- (void) write (out, buffer, strlen (buffer));
- }
- }
- ***************
- *** 601,607 ****
- register FILE *tmp;
- register struct comp *cptr;
- struct format *fmt;
- ! int dat[4];
-
- nfs = new_fs (form, NULLCP, NULLCP);
- fmtsize = strlen (nfs) + 256;
- --- 646,652 ----
- register FILE *tmp;
- register struct comp *cptr;
- struct format *fmt;
- ! int dat[5];
-
- nfs = new_fs (form, NULLCP, NULLCP);
- fmtsize = strlen (nfs) + 256;
- ***************
- *** 618,623 ****
- --- 663,669 ----
- dat[1] = volume;
- dat[2] = 0;
- dat[3] = fmtsize;
- + dat[4] = 0;
-
- (void) strcpy (tmpfil, m_tmpfil (invo_name));
- if ((tmp = fopen (tmpfil, "w+")) == NULL)
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- uip/ftpsbr.c Thu Dec 3 08:50:36 1992
- ***************
- *** 0 ****
- --- 1,601 ----
- + /* ftpsbr.c - simple FTP client library (why doesn't BSD have one?!?) */
- +
- + #ifndef lint
- + static char ident[] = "@(#)$Id: ftpsbr.c,v 1.10 1992/12/03 16:50:27 jromine Exp $";
- + #endif
- +
- + #include "../h/mh.h"
- + #include "../h/mhn.h"
- + #ifdef FTP
- + #include <ctype.h>
- + #ifdef SVR4
- + #undef NULLVP /* stdio.h */
- + #endif
- + #include <stdio.h>
- + #include <arpa/ftp.h>
- + #ifdef __STDC__
- + #include <stdarg.h>
- + #else
- + #include <varargs.h>
- + #endif
- +
- + #ifdef __STDC__
- + static int command(int arg1, ...);
- + #else
- + static int command();
- + #endif
- +
- + static int ftp_quit(), ftp_read(), initconn(),
- + dataconn(), _command(), getreply();
- +
- + /* DATA */
- +
- + #define v_debug debugsw
- + #define v_verbose verbosw
- +
- +
- + static int ftp_fd = NOTOK;
- + static int data_fd = NOTOK;
- +
- + static int v_noise;
- +
- + extern int v_debug;
- + extern int v_verbose;
- +
- + /* */
- +
- + #if defined(SYS5) && defined(AUX)
- + #define u_short ushort
- + #define u_long ulong
- + #endif
- +
- +
- + /* taken from ISODE's compat/internet.c */
- +
- + #include <sys/types.h>
- + #include <sys/socket.h>
- + #include <netinet/in.h>
- + #include <netdb.h>
- +
- + #if defined(BIND) && !defined(h_addr)
- + #define h_addr h_addr_list[0]
- + #endif
- +
- + #define inaddr_copy(hp,sin) \
- + bcopy ((hp) -> h_addr, (char *) &((sin) -> sin_addr), (hp) -> h_length)
- +
- + #ifndef DG
- + u_long inet_addr ();
- + #else
- + struct in_addr inet_addr ();
- + #endif
- +
- +
- + static char *empty = NULL;
- + #ifdef h_addr
- + static char *addrs[2] = { NULL };
- + #endif
- +
- + static struct hostent *gethostbystring (s)
- + char *s;
- + {
- + register struct hostent *h;
- + #ifndef DG
- + static u_long iaddr;
- + #else
- + static struct in_addr iaddr;
- + #endif
- + static struct hostent hs;
- +
- + iaddr = inet_addr (s);
- + #ifndef DG
- + if (iaddr == NOTOK && strcmp (s, "255.255.255.255"))
- + #else
- + if (iaddr.s_addr == NOTOK && strcmp (s, "255.255.255.255"))
- + #endif
- + return gethostbyname (s);
- +
- + h = &hs;
- + h -> h_name = s;
- + h -> h_aliases = ∅
- + h -> h_addrtype = AF_INET;
- + h -> h_length = sizeof (iaddr);
- + #ifdef h_addr
- + h -> h_addr_list = addrs;
- + bzero ((char *) addrs, sizeof addrs);
- + #endif
- + h -> h_addr = (char *) &iaddr;
- +
- + return h;
- + }
- +
- + /* */
- +
- + extern int errno;
- + extern int sys_nerr;
- + extern char *sys_errlist[];
- +
- +
- + #define start_tcp_client(sock,priv) \
- + socket (AF_INET, SOCK_STREAM, 0)
- +
- + #define join_tcp_server(fd, sock) \
- + connect ((fd), (struct sockaddr *) (sock), sizeof *(sock))
- +
- +
- + /* ARGSUSED */
- +
- + static int start_tcp_server (sock, backlog, opt1, opt2)
- + struct sockaddr_in *sock;
- + int backlog,
- + opt1,
- + opt2;
- + {
- + int eindex,
- + sd;
- +
- + if ((sd = socket (AF_INET, SOCK_STREAM, 0)) == NOTOK)
- + return NOTOK;
- +
- + if (bind (sd, (struct sockaddr *) sock, sizeof *sock) == NOTOK) {
- + eindex = errno;
- + (void) close (sd);
- + errno = eindex;
- + }
- + else
- + (void) listen (sd, backlog);
- +
- + return sd;
- + }
- +
- + static int __len__;
- + #define join_tcp_client(fd,sock) \
- + accept ((fd), (struct sockaddr *) (sock), \
- + (__len__ = sizeof *(sock), &__len__))
- +
- +
- + #define read_tcp_socket read
- + #define write_tcp_socket write
- + #define close_tcp_socket close
- +
- + /* */
- +
- + static void _asprintf (bp, what, ap) /* fmt, args, ... */
- + register char *bp;
- + char *what;
- + va_list ap;
- + {
- + register int eindex;
- + char *fmt;
- +
- + eindex = errno;
- +
- + *bp = '\0';
- + fmt = va_arg (ap, char *);
- +
- + if (fmt) {
- + #ifndef VSPRINTF
- + struct _iobuf iob;
- + #endif
- +
- + #ifndef VSPRINTF
- + #ifdef pyr
- + bzero ((char *) &iob, sizeof iob);
- + iob._file = _NFILE;
- + #endif
- + iob._flag = _IOWRT | _IOSTRG;
- + #if !defined(vax) && !defined(pyr) && !defined(sequent)
- + iob._ptr = (unsigned char *) bp;
- + #else
- + iob._ptr = bp;
- + #endif
- + iob._cnt = BUFSIZ;
- + _doprnt (fmt, ap, &iob);
- + (void) putc ('\0', &iob);
- + #else
- + (void) vsprintf (bp, fmt, ap);
- + #endif
- + bp += strlen (bp);
- +
- + }
- +
- + if (what) {
- + if (*what) {
- + (void) sprintf (bp, " %s: ", what);
- + bp += strlen (bp);
- + }
- + if (0 < eindex && eindex < sys_nerr)
- + (void) strcpy (bp, sys_errlist[eindex]);
- + else
- + (void) sprintf (bp, "Error %d", eindex);
- + bp += strlen (bp);
- + }
- +
- + errno = eindex;
- + }
- +
- + /* */
- +
- + int ftp_get (host, user, password, cwd, remote, local, ascii, stayopen)
- + char *host,
- + *user,
- + *password,
- + *cwd,
- + *remote,
- + *local;
- + int ascii,
- + stayopen;
- + {
- + int result;
- +
- + if (stayopen <= 0) {
- + result = ftp_quit ();
- + if (host == NULL)
- + return result;
- + }
- +
- + if (ftp_fd == NOTOK) {
- + struct sockaddr_in in_socket;
- + register struct hostent *hp;
- + register struct servent *sp;
- +
- + if ((sp = getservbyname ("ftp", "tcp")) == NULL) {
- + fprintf (stderr, "tcp/ftp: unknown service");
- + return NOTOK;
- + }
- + if ((hp = gethostbystring (host)) == NULL) {
- + fprintf (stderr, "%s: unknown host\n", host);
- + return NOTOK;
- + }
- + in_socket.sin_family = hp -> h_addrtype;
- + inaddr_copy (hp, &in_socket);
- + in_socket.sin_port = sp -> s_port;
- +
- + if ((ftp_fd = start_tcp_client ((struct sockaddr_in *) NULL, 0))
- + == NOTOK) {
- + perror (host);
- + return NOTOK;
- + }
- + if (join_tcp_server (ftp_fd, &in_socket) == NOTOK) {
- + perror (host);
- + (void) close_tcp_socket (ftp_fd), ftp_fd = NOTOK;
- + return NOTOK;
- + }
- + (void) getreply (1, 0);
- +
- + if (v_verbose) {
- + fprintf (stdout, "Connected to %s\n", host);
- + (void) fflush (stdout);
- + }
- +
- + if (user) {
- + if ((result = command (0, "USER %s", user)) == CONTINUE)
- + result = command (1, "PASS %s", password);
- + if (result != COMPLETE) {
- + result = NOTOK;
- + goto out;
- + }
- + }
- +
- + if (remote == NULL)
- + return OK;
- + }
- +
- + if (cwd && ((result = command (0, "CWD %s", cwd)) != COMPLETE
- + && result != CONTINUE)) {
- + result = NOTOK;
- + goto out;
- + }
- +
- + if (command (1, ascii ? "TYPE A" : "TYPE I") != COMPLETE) {
- + result = NOTOK;
- + goto out;
- + }
- +
- + result = ftp_read (remote, local, ascii);
- +
- + out: ;
- + if (result != OK || !stayopen)
- + (void) ftp_quit ();
- +
- + return result;
- + }
- +
- + /* */
- +
- + static int ftp_quit ()
- + {
- + int n;
- +
- + if (ftp_fd == NOTOK)
- + return OK;
- +
- + n = command (1, "QUIT");
- +
- + (void) close_tcp_socket (ftp_fd), ftp_fd = NOTOK;
- +
- + return (n == 0 || n == COMPLETE ? OK : NOTOK);
- + }
- +
- + /* */
- +
- + static int ftp_read (remote, local, ascii)
- + char *remote,
- + *local;
- + int ascii;
- + {
- + register int cc;
- + int expectingreply = 0;
- + char buffer[BUFSIZ];
- + FILE *fp;
- +
- + if (initconn () == NOTOK)
- + goto bad;
- +
- + v_noise = v_verbose;
- + if (command (-1, "RETR %s", remote) != PRELIM)
- + goto bad;
- +
- + expectingreply++;
- + if (dataconn () == NOTOK) {
- + bad: ;
- + if (data_fd != NOTOK)
- + (void) close_tcp_socket (data_fd), data_fd = NOTOK;
- + if (expectingreply)
- + (void) getreply (-2, 0);
- +
- + return NOTOK;
- + }
- +
- + if ((fp = fopen (local, "w")) == NULL) {
- + perror (local);
- + goto bad;
- + }
- +
- + if (ascii) {
- + int c;
- + FILE *in;
- +
- + if (!(in = fdopen (data_fd, "r"))) {
- + perror ("fdopen");
- + goto bad;
- + }
- + while ((c = getc (in)) != EOF) {
- + if (c == '\r')
- + switch (c = getc (in)) {
- + case EOF:
- + case '\0':
- + c = '\r';
- + break;
- +
- + case '\n':
- + break;
- +
- + default:
- + (void) putc ('\r', fp);
- + break;
- + }
- +
- + if (putc (c, fp) == EOF) {
- + perror ("putc");
- + (void) fclose (in);
- + data_fd = NOTOK;
- + goto bad;
- + }
- + }
- +
- + (void) fclose (in);
- + data_fd = NOTOK;
- + }
- + else {
- + while ((cc = read_tcp_socket (data_fd, buffer, sizeof buffer)) > 0)
- + if (fwrite (buffer, sizeof *buffer, cc, fp) == 0) {
- + perror ("fwrite");
- + goto bad;
- + }
- + if (cc < 0) {
- + perror ("read_tcp_socket");
- + goto bad;
- + }
- +
- + (void) close_tcp_socket (data_fd), data_fd = NOTOK;
- + }
- +
- + (void) fclose (fp);
- +
- + v_noise = v_verbose;
- + return (getreply (1, 0) == COMPLETE ? OK : NOTOK);
- + }
- +
- + /* */
- +
- + static int initconn ()
- + {
- + int len;
- + register char *a,
- + *p;
- + struct sockaddr_in in_socket;
- +
- + if (getsockname (ftp_fd, (struct sockaddr *) &in_socket,
- + (len = sizeof in_socket, &len)) == NOTOK) {
- + perror ("getsockname");
- + return NOTOK;
- + }
- + in_socket.sin_port = 0;
- + if ((data_fd = start_tcp_server (&in_socket, 1, 0, 0)) == NOTOK) {
- + perror ("start_tcp_server");
- + return NOTOK;
- + }
- +
- + if (getsockname (data_fd, (struct sockaddr *) &in_socket,
- + (len = sizeof in_socket, &len)) == NOTOK) {
- + perror ("getsockname");
- + return NOTOK;
- + }
- +
- + a = (char *) &in_socket.sin_addr;
- + p = (char *) &in_socket.sin_port;
- +
- + #define UC(b) (((int) b) & 0xff)
- + if (command (1, "PORT %d,%d,%d,%d,%d,%d",
- + UC(a[0]), UC(a[1]), UC(a[2]), UC(a[3]),
- + UC(p[0]), UC(p[1])) == COMPLETE)
- + return OK;
- +
- + return NOTOK;
- + }
- +
- + /* */
- +
- + static int dataconn ()
- + {
- + int fd;
- + struct sockaddr_in in_socket;
- +
- + if ((fd = join_tcp_client (data_fd, &in_socket)) == NOTOK) {
- + perror ("join_tcp_client");
- + return NOTOK;
- + }
- + (void) close_tcp_socket (data_fd);
- + data_fd = fd;
- +
- + return OK;
- + }
- +
- + /* */
- +
- + #ifndef lint
- + #ifdef __STDC__
- + static int command (int arg1, ...)
- + {
- + int val;
- + va_list ap;
- +
- + va_start (ap, arg1);
- +
- + val = _command (arg1, ap);
- +
- + va_end (ap);
- +
- + return val;
- + }
- + #else
- + static int command (va_alist)
- + va_dcl
- + {
- + int val;
- + va_list ap;
- +
- + va_start (ap);
- +
- + val = _command (va_arg (ap, int), ap);
- +
- + va_end (ap);
- +
- + return val;
- + }
- + #endif
- +
- + static int _command (complete, ap)
- + int complete;
- + va_list ap;
- + {
- + int len;
- + char buffer[BUFSIZ];
- +
- + if (ftp_fd == NOTOK)
- + return NOTOK;
- +
- + _asprintf (buffer, NULLCP, ap);
- + if (v_debug)
- + fprintf (stderr, "<--- %s\n", buffer);
- +
- + (void) strcat (buffer, "\r\n");
- + len = strlen (buffer);
- +
- + if (write_tcp_socket (ftp_fd, buffer, len) != len) {
- + perror ("write_tcp_socket");
- + return NOTOK;
- + }
- +
- + return (getreply (complete, !strcmp (buffer, "QUIT")));
- + }
- + #else
- + /* VARARGS2 */
- +
- + static int command (complete, fmt)
- + int complete;
- + char *fmt;
- + {
- + return command (complete, fmt);
- + }
- + #endif
- +
- + /* */
- +
- + static int getreply (complete, expecteof)
- + int complete,
- + expecteof;
- + {
- + for (;;) {
- + register int code,
- + dig,
- + n;
- + int continuation;
- + register char *bp;
- + char buffer[BUFSIZ];
- +
- + code = dig = n = continuation = 0;
- + bp = buffer;
- +
- + for (;;) {
- + char c;
- +
- + if (read_tcp_socket (ftp_fd, &c, 1) < 1) {
- + if (expecteof)
- + return OK;
- +
- + perror ("read_tcp_socket");
- + return DONE;
- + }
- + if (c == '\n')
- + break;
- + *bp++ = c != '\r' ? c : '\0';
- +
- + dig++;
- + if (dig < 4) {
- + if (isdigit(c))
- + code = code * 10 + (c - '0');
- + else /* XXX: naughty FTP... */
- + if (isspace (c))
- + continuation++;
- + }
- + else
- + if (dig == 4 && c == '-')
- + continuation++;
- + if (n == 0)
- + n = c;
- + }
- +
- + if (v_debug)
- + fprintf (stderr, "---> %s\n", buffer);
- + if (continuation)
- + continue;
- +
- + n -= '0';
- +
- + if (v_noise) {
- + fprintf (stdout, "%s\n", buffer);
- + (void) fflush (stdout);
- + v_noise = 0;
- + }
- + else
- + if ((complete == -1 && n != PRELIM)
- + || (complete == 0 && n != CONTINUE && n != COMPLETE)
- + || (complete == 1 && n != COMPLETE))
- + fprintf (stderr, "%s\n", buffer);
- +
- + return n;
- + }
- + }
- + #endif
- *** ../mh-6.7.2/uip/inc.c Thu Apr 5 16:03:29 1990
- --- uip/inc.c Mon Dec 14 16:21:11 1992
- ***************
- *** 1,12 ****
- /* inc.c - incorporate messages from a maildrop into a folder */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: inc.c,v 1.4 90/04/05 14:57:51 sources Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #ifdef POP
- #include "../h/dropsbr.h"
- ! #endif POP
- #include "../h/formatsbr.h"
- #include "../h/scansbr.h"
- #include "../zotnet/tws.h"
- --- 1,30 ----
- /* inc.c - incorporate messages from a maildrop into a folder */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: inc.c,v 1.20 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- + #ifdef MAILGROUP
- + /* Revised: Sat Apr 14 17:08:17 PDT 1990 (marvit@hplabs)
- + * Added hpux hacks to set and reset gid to be "mail" as needed. The reset
- + * is necessary so inc'ed mail is the group of the inc'er, rather than
- + * "mail". We setgid to egid only when [un]locking the mail file. This
- + * is also a major security precaution which will not be explained here.
- + *
- + * Fri Feb 7 16:04:57 PST 1992 John Romine <bug-mh@ics.uci.edu>
- + * NB: I'm not 100% sure that this setgid stuff is secure even now.
- + */
- + #endif
- +
- #include "../h/mh.h"
- #ifdef POP
- #include "../h/dropsbr.h"
- ! #endif
- ! #ifdef KPOP
- ! #include <krb.h>
- ! #endif
- ! #ifdef HESIOD
- ! #include <hesiod.h>
- ! #endif
- #include "../h/formatsbr.h"
- #include "../h/scansbr.h"
- #include "../zotnet/tws.h"
- ***************
- *** 16,47 ****
- #include <signal.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-
- /* */
-
- #ifndef MF
- #define MFminc(a) (a)
- ! #else MF
- #define MFminc(a) 0
- ! #endif MF
-
- #ifndef POP
- #define POPminc(a) (a)
- ! #else POP
- #define POPminc(a) 0
- ! #endif POP
-
- #ifndef RPOP
- #define RPOPminc(a) (a)
- ! #else RPOP
- #define RPOPminc(a) 0
- ! #endif RPOP
-
- #ifndef TMA
- #define TMAminc(a) (a)
- ! #else TMA
- #define TMAminc(a) 0
- ! #endif TMA
-
- static struct swit switches[] = {
- #define AUDSW 0
- --- 34,74 ----
- #include <signal.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
- /* */
-
- #ifndef MF
- #define MFminc(a) (a)
- ! #else /* MF */
- #define MFminc(a) 0
- ! #endif /* MF */
-
- #ifndef POP
- #define POPminc(a) (a)
- ! #else /* POP */
- #define POPminc(a) 0
- ! #endif /* POP */
-
- #ifndef RPOP
- #define RPOPminc(a) (a)
- ! #else /* RPOP */
- #define RPOPminc(a) 0
- ! #endif /* RPOP */
-
- + #ifndef APOP
- + #define APOPminc(a) (a)
- + #else
- + #define APOPminc(a) 0
- + #endif /* APOP */
- +
- #ifndef TMA
- #define TMAminc(a) (a)
- ! #else /* TMA */
- #define TMAminc(a) 0
- ! #endif /* TMA */
-
- static struct swit switches[] = {
- #define AUDSW 0
- ***************
- *** 76,108 ****
- #define NPACKSW 12
- "nopack", POPminc (-6),
-
- ! #define RPOPSW 13
- "rpop", RPOPminc (-4),
- ! #define NRPOPSW 14
- "norpop", RPOPminc (-6),
-
- ! #define SILSW 15
- "silent", 0,
- ! #define NSILSW 16
- "nosilent", 0,
-
- ! #define TRNCSW 17
- "truncate", 0,
- ! #define NTRNCSW 18
- "notruncate", 0,
-
- ! #define UUCPSW 19
- "uucp", MFminc (-4),
- ! #define NUUCPSW 20
- "nouucp", MFminc (-6),
-
- ! #define WIDSW 21
- "width columns", 0,
-
- ! #define HELPSW 22
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 103,140 ----
- #define NPACKSW 12
- "nopack", POPminc (-6),
-
- ! #define APOPSW 13
- ! "apop", APOPminc (-4),
- ! #define NAPOPSW 14
- ! "noapop", APOPminc (-6),
- !
- ! #define RPOPSW 15
- "rpop", RPOPminc (-4),
- ! #define NRPOPSW 16
- "norpop", RPOPminc (-6),
-
- ! #define SILSW 17
- "silent", 0,
- ! #define NSILSW 18
- "nosilent", 0,
-
- ! #define TRNCSW 19
- "truncate", 0,
- ! #define NTRNCSW 20
- "notruncate", 0,
-
- ! #define UUCPSW 21
- "uucp", MFminc (-4),
- ! #define NUUCPSW 22
- "nouucp", MFminc (-6),
-
- ! #define WIDSW 23
- "width columns", 0,
-
- ! #define HELPSW 24
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 124,135 ****
-
- static int pop_action (), pop_pack ();
- static int map_count();
- ! #endif POP
-
- /* * /
-
- /* ARGSUSED */
-
- main (argc, argv)
- int argc;
- char *argv[];
- --- 156,171 ----
-
- static int pop_action (), pop_pack ();
- static int map_count();
- ! #endif /* POP */
-
- /* * /
-
- /* ARGSUSED */
-
- + #ifdef MAILGROUP /* For setting and returning to "mail" gid */
- + static int return_gid;
- + #endif /* MAILGROUP */
- +
- main (argc, argv)
- int argc;
- char *argv[];
- ***************
- *** 141,153 ****
- width = 0,
- #ifdef MF
- uucp = 1,
- ! #endif MF
- locked = 0,
- #ifdef POP
- nmsgs,
- nbytes,
- ! p,
- ! #endif POP
- rpop = 1,
- i,
- hghnum,
- --- 177,189 ----
- width = 0,
- #ifdef MF
- uucp = 1,
- ! #endif /* MF */
- locked = 0,
- #ifdef POP
- nmsgs,
- nbytes,
- ! p = 0,
- ! #endif /* POP */
- rpop = 1,
- i,
- hghnum,
- ***************
- *** 160,169 ****
- *audfile = NULL,
- *from = NULL,
- *host = NULL,
- - *user = NULL,
- #ifdef POP
- *pass = NULL,
- ! #endif POP
- *newmail,
- buf[100],
- **ap,
- --- 196,204 ----
- *audfile = NULL,
- *from = NULL,
- *host = NULL,
- #ifdef POP
- *pass = NULL,
- ! #endif /* POP */
- *newmail,
- buf[100],
- **ap,
- ***************
- *** 170,175 ****
- --- 205,211 ----
- **argp,
- *nfs,
- *arguments[MAXARGS];
- + char *user = NULL;
- struct msgs *mp;
- struct stat st,
- s1;
- ***************
- *** 176,191 ****
- FILE *in, *aud = NULL;
- #ifdef MHE
- FILE *mhe = NULL;
- ! #endif MHE
-
- invo_name = r1bindex (argv[0], '/');
- mts_init (invo_name);
- #ifdef POP
- - if (pophost && *pophost)
- - host = pophost;
- if ((cp = getenv ("MHPOPDEBUG")) && *cp)
- snoop++;
- ! #endif POP
- if ((cp = m_find (invo_name)) != NULL) {
- ap = brkstring (cp = getcpy (cp), " ", "\n");
- ap = copyip (ap, arguments);
- --- 212,234 ----
- FILE *in, *aud = NULL;
- #ifdef MHE
- FILE *mhe = NULL;
- ! #endif /* MHE */
- ! #ifdef HESIOD
- ! struct hes_postoffice *po;
- ! char *tmphost;
- ! #endif
-
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- invo_name = r1bindex (argv[0], '/');
- mts_init (invo_name);
- +
- #ifdef POP
- if ((cp = getenv ("MHPOPDEBUG")) && *cp)
- snoop++;
- ! #endif
- !
- if ((cp = m_find (invo_name)) != NULL) {
- ap = brkstring (cp = getcpy (cp), " ", "\n");
- ap = copyip (ap, arguments);
- ***************
- *** 271,282 ****
- case UUCPSW:
- #ifdef MF
- uucp++;
- ! #endif MF
- continue;
- case NUUCPSW:
- #ifdef MF
- uucp = 0;
- ! #endif MF
- continue;
-
- case HOSTSW:
- --- 314,325 ----
- case UUCPSW:
- #ifdef MF
- uucp++;
- ! #endif /* MF */
- continue;
- case NUUCPSW:
- #ifdef MF
- uucp = 0;
- ! #endif /* MF */
- continue;
-
- case HOSTSW:
- ***************
- *** 291,309 ****
- #ifndef POP
- if (!(cp = *argp++) || *cp == '-')
- adios (NULLCP, "missing argument to %s", argp[-2]);
- ! #else POP
- if (!(file = *argp++) || *file == '-')
- adios (NULLCP, "missing argument to %s", argp[-2]);
- ! #endif POP
- continue;
- case NPACKSW:
- #ifdef POP
- file = NULLCP;
- ! #endif POP
- continue;
- case RPOPSW:
- ! rpop++;
- continue;
- case NRPOPSW:
- rpop = 0;
- continue;
- --- 334,356 ----
- #ifndef POP
- if (!(cp = *argp++) || *cp == '-')
- adios (NULLCP, "missing argument to %s", argp[-2]);
- ! #else /* POP */
- if (!(file = *argp++) || *file == '-')
- adios (NULLCP, "missing argument to %s", argp[-2]);
- ! #endif /* POP */
- continue;
- case NPACKSW:
- #ifdef POP
- file = NULLCP;
- ! #endif /* POP */
- continue;
- + case APOPSW:
- + rpop = -1;
- + continue;
- case RPOPSW:
- ! rpop = 1;
- continue;
- + case NAPOPSW:
- case NRPOPSW:
- rpop = 0;
- continue;
- ***************
- *** 320,336 ****
-
- /* */
-
- #ifdef POP
- if (host && !*host)
- host = NULL;
- ! if (from || !host || !rpop)
- (void) setuid (getuid ());
- ! #endif POP
- if (from) {
- newmail = from;
- #ifdef POP
- host = NULL;
- ! #endif POP
- if (stat (newmail, &s1) == NOTOK || s1.st_size == 0)
- adios (NULLCP, "no mail to incorporate");
- }
- --- 367,408 ----
-
- /* */
-
- + #ifdef MAILGROUP
- + return_gid = getegid(); /* Save effective gid, assuming we'll use it */
- + setgid(getgid()); /* Turn off extraordinary privileges */
- + #endif /* MAILGROUP */
- +
- #ifdef POP
- + #ifdef HESIOD
- + /*
- + * Scheme is:
- + * use MAILHOST environment variable if present,
- + * else try Hesiod.
- + * If that fails, use the default (if any)
- + * provided by mtstailor in mts_init()
- + */
- + if (pophost == NULL || pophost[0] == '\0')
- + {
- + if ((tmphost = getenv("MAILHOST")) != NULL)
- + pophost = tmphost;
- + else if ((po = hes_getmailhost(getusr())) != NULL &&
- + strcmp(po->po_type, "POP") == 0)
- + pophost = po->po_host;
- + }
- + #endif /* HESIOD */
- + if (pophost && *pophost)
- + host = pophost;
- +
- if (host && !*host)
- host = NULL;
- ! if (from || !host || rpop <= 0)
- (void) setuid (getuid ());
- ! #endif /* POP */
- if (from) {
- newmail = from;
- #ifdef POP
- host = NULL;
- ! #endif /* POP */
- if (stat (newmail, &s1) == NOTOK || s1.st_size == 0)
- adios (NULLCP, "no mail to incorporate");
- }
- ***************
- *** 354,360 ****
- adios (NULLCP, "no mail to incorporate");
- }
- }
- ! #endif POP
- else {
- if (((newmail = getenv ("MAILDROP")) && *newmail)
- || ((newmail = m_find ("maildrop")) && *newmail))
- --- 426,432 ----
- adios (NULLCP, "no mail to incorporate");
- }
- }
- ! #endif /* POP */
- else {
- if (((newmail = getenv ("MAILDROP")) && *newmail)
- || ((newmail = m_find ("maildrop")) && *newmail))
- ***************
- *** 363,369 ****
- #ifdef MF
- if (uucp && umincproc && *umincproc)
- get_uucp_mail ();
- ! #endif MF
- newmail = concat (MAILDIR, "/", MAILFIL, NULLCP);
- }
- if (stat (newmail, &s1) == NOTOK || s1.st_size == 0)
- --- 435,441 ----
- #ifdef MF
- if (uucp && umincproc && *umincproc)
- get_uucp_mail ();
- ! #endif /* MF */
- newmail = concat (MAILDIR, "/", MAILFIL, NULLCP);
- }
- if (stat (newmail, &s1) == NOTOK || s1.st_size == 0)
- ***************
- *** 373,382 ****
- #ifdef POP
- if (host && file)
- goto go_to_it;
- ! #endif POP
- if (!m_find ("path"))
- free (path ("./", TFOLDER));
- ! if (!folder)
- folder = defalt;
- maildir = m_maildir (folder);
-
- --- 445,454 ----
- #ifdef POP
- if (host && file)
- goto go_to_it;
- ! #endif /* POP */
- if (!m_find ("path"))
- free (path ("./", TFOLDER));
- ! if (!folder && !(folder = m_find (inbox)))
- folder = defalt;
- maildir = m_maildir (folder);
-
- ***************
- *** 401,407 ****
- #ifdef POP
- go_to_it: ;
- if (host == NULL)
- ! #endif POP
- if (access (newmail, 02) == NOTOK) {
- trnflag = 0;
- if ((in = fopen (newmail, "r")) == NULL)
- --- 473,479 ----
- #ifdef POP
- go_to_it: ;
- if (host == NULL)
- ! #endif /* POP */
- if (access (newmail, 02) == NOTOK) {
- trnflag = 0;
- if ((in = fopen (newmail, "r")) == NULL)
- ***************
- *** 415,425 ****
- --- 487,508 ----
- (void) signal (SIGQUIT, SIG_IGN);
- (void) signal (SIGTERM, SIG_IGN);
- }
- +
- + #ifdef MAILGROUP
- + setgid(return_gid); /* Reset gid to lock mail file */
- + #endif /* MAILGROUP */
- if ((in = lkfopen (newmail, "r")) == NULL)
- adios (NULLCP, "unable to lock and fopen %s", newmail);
- + #ifdef MAILGROUP
- + setgid(getgid()); /* Return us to normal privileges */
- + #endif /* MAILGROUP */
- (void) fstat (fileno(in), &s1);
- }
-
- + #ifdef MAILGROUP
- + setgid(getgid()); /* Return us to normal privileges */
- + #endif /* MAILGROUP */
- +
- if (audfile) {
- if ((i = stat (audfile, &st)) == NOTOK)
- advise (NULLCP, "Creating Receive-Audit: %s", audfile);
- ***************
- *** 431,442 ****
- #ifndef POP
- fprintf (aud, from ? "<<inc>> %s -ms %s\n" : "<<inc>> %s\n",
- dtimenow (), from);
- ! #else POP
- fprintf (aud, from ? "<<inc>> %s -ms %s\n"
- : host ? "<<inc>> %s -host %s -user %s%s\n"
- : "<<inc>> %s\n",
- ! dtimenow (), from ? from : host, user, rpop ? " -rpop" : "");
- ! #endif POP
- }
-
- #ifdef MHE
- --- 514,526 ----
- #ifndef POP
- fprintf (aud, from ? "<<inc>> %s -ms %s\n" : "<<inc>> %s\n",
- dtimenow (), from);
- ! #else /* POP */
- fprintf (aud, from ? "<<inc>> %s -ms %s\n"
- : host ? "<<inc>> %s -host %s -user %s%s\n"
- : "<<inc>> %s\n",
- ! dtimenow (), from ? from : host, user,
- ! rpop < 0 ? " -apop" : rpop > 0 ? " -rpop" : "");
- ! #endif /* POP */
- }
-
- #ifdef MHE
- ***************
- *** 450,456 ****
- (void) chmod (cp, m_gmprot ());
- free (cp);
- }
- ! #endif MHE
-
- nfs = new_fs (form, format, FORMAT);
-
- --- 534,540 ----
- (void) chmod (cp, m_gmprot ());
- free (cp);
- }
- ! #endif /* MHE */
-
- nfs = new_fs (form, format, FORMAT);
-
- ***************
- *** 520,531 ****
- }
- switch (p = scan (pf, msgnum, 0, nfs, width,
- file ? 0 : msgnum == mp -> hghmsg + 1 && chgflag,
- 0, stop - start, noisy)) {
- case SCNEOF:
- printf ("%*d empty\n", DMAXFOLDER, msgnum);
- break;
-
- ! case SCNERR:
- case SCNNUM:
- break;
-
- --- 604,622 ----
- }
- switch (p = scan (pf, msgnum, 0, nfs, width,
- file ? 0 : msgnum == mp -> hghmsg + 1 && chgflag,
- + 1, /* check UNSEEN? */
- 0, stop - start, noisy)) {
- case SCNEOF:
- printf ("%*d empty\n", DMAXFOLDER, msgnum);
- break;
-
- ! case SCNFAT:
- ! trnflag = 0;
- ! noisy++;
- ! /* advise (cp, "unable to read"); already advised */
- ! /* fall thru */
- !
- ! case SCNERR:
- case SCNNUM:
- break;
-
- ***************
- *** 537,543 ****
- #ifdef MHE
- if (mhe)
- fputs (scanl, mhe);
- ! #endif MHE
- if (noisy)
- (void) fflush (stdout);
- if (!file) {
- --- 628,634 ----
- #ifdef MHE
- if (mhe)
- fputs (scanl, mhe);
- ! #endif /* MHE */
- if (noisy)
- (void) fflush (stdout);
- if (!file) {
- ***************
- *** 551,557 ****
- mp -> numsel++;
- mp -> msgstats[msgnum] |= SELECTED;
- }
- ! #endif TMA
- mp -> msgstats[msgnum] |= UNSEEN;
- mp -> msgflags |= SEQMOD;
- }
- --- 642,648 ----
- mp -> numsel++;
- mp -> msgstats[msgnum] |= SELECTED;
- }
- ! #endif /* TMA */
- mp -> msgstats[msgnum] |= UNSEEN;
- mp -> msgflags |= SEQMOD;
- }
- ***************
- *** 560,573 ****
- if (file) {
- (void) fseek (pf, stop, 0);
- (void) fwrite (mmdlm2, 1, strlen (mmdlm2), pf);
- ! if (fflush (pf))
- adios (file, "write error on");
- (void) map_write (file, pd, 0, 0L, start, stop, pos, size,
- noisy);
- }
- else {
- ! if (ferror(pf) || fclose (pf))
- ! adios (file, "write error on");
- free (cp);
- }
-
- --- 651,673 ----
- if (file) {
- (void) fseek (pf, stop, 0);
- (void) fwrite (mmdlm2, 1, strlen (mmdlm2), pf);
- ! if (fflush (pf) || ferror (pf)) {
- ! int e = errno;
- ! (void) pop_quit ();
- ! errno = e;
- adios (file, "write error on");
- + }
- (void) map_write (file, pd, 0, 0L, start, stop, pos, size,
- noisy);
- }
- else {
- ! if (ferror(pf) || fclose (pf)) {
- ! int e = errno;
- ! (void) unlink (cp);
- ! (void) pop_quit ();
- ! errno = e;
- ! adios (cp, "write error on");
- ! }
- free (cp);
- }
-
- ***************
- *** 582,617 ****
- }
- }
- else {
- ! #endif POP
-
- /* */
-
- m_unknown (in); /* the MAGIC invocation... */
- hghnum = msgnum = mp -> hghmsg;
- ! for (;;) {
- if (msgnum >= mp -> hghoff)
- ! if ((mp = m_remsg (mp, 0, mp -> hghoff + MAXFOLDER)) == NULL)
- ! adios (NULLCP, "unable to allocate folder storage");
-
- switch (i = scan (in, msgnum + 1, msgnum + 1, nfs, width,
- msgnum == hghnum && chgflag,
- 0,
- 0L,
- noisy)) {
- case SCNEOF:
- break;
-
- ! case SCNERR:
- if (aud)
- fputs ("inc aborted!\n", aud);
- ! adios (NULLCP, "aborted!");
-
- case SCNNUM:
- ! adios (NULLCP, "more than %d messages in folder %s, %s not zero'd",
- MAXFOLDER, folder, newmail);
-
- default:
- ! adios (NULLCP, "scan() botch (%d)", i);
-
- case SCNMSG:
- case SCNENC:
- --- 682,726 ----
- }
- }
- else {
- ! #endif /* POP */
-
- /* */
-
- m_unknown (in); /* the MAGIC invocation... */
- hghnum = msgnum = mp -> hghmsg;
- ! for (i = 0;;) {
- if (msgnum >= mp -> hghoff)
- ! if ((mp = m_remsg (mp, 0, mp -> hghoff + MAXFOLDER)) == NULL) {
- ! advise (NULLCP, "unable to allocate folder storage");
- ! i = NOTOK;
- ! break;
- ! }
-
- switch (i = scan (in, msgnum + 1, msgnum + 1, nfs, width,
- msgnum == hghnum && chgflag,
- + 1, /* check UNSEEN? */
- 0,
- 0L,
- noisy)) {
- + case SCNFAT:
- case SCNEOF:
- break;
-
- ! case SCNERR:
- if (aud)
- fputs ("inc aborted!\n", aud);
- ! advise (NULLCP, "aborted!"); /* doesn't clean up locks! */
- ! break;
-
- case SCNNUM:
- ! advise (NULLCP,
- ! "more than %d messages in folder %s, %s not zero'd",
- MAXFOLDER, folder, newmail);
- + break;
-
- default:
- ! advise (NULLCP, "scan() botch (%d)", i);
- ! break;
-
- case SCNMSG:
- case SCNENC:
- ***************
- *** 620,626 ****
- #ifdef MHE
- if (mhe)
- fputs (scanl, mhe);
- ! #endif MHE
- if (noisy)
- (void) fflush (stdout);
-
- --- 729,735 ----
- #ifdef MHE
- if (mhe)
- fputs (scanl, mhe);
- ! #endif /* MHE */
- if (noisy)
- (void) fflush (stdout);
-
- ***************
- *** 635,641 ****
- mp -> numsel++;
- mp -> msgstats[msgnum] |= SELECTED;
- }
- ! #endif TMA
- mp -> msgstats[msgnum] |= UNSEEN;
- mp -> msgflags |= SEQMOD;
- continue;
- --- 744,750 ----
- mp -> numsel++;
- mp -> msgstats[msgnum] |= SELECTED;
- }
- ! #endif /* TMA */
- mp -> msgstats[msgnum] |= UNSEEN;
- mp -> msgflags |= SEQMOD;
- continue;
- ***************
- *** 644,669 ****
- }
- #ifdef POP
- }
- ! #endif POP
-
- if (aud)
- (void) fclose (aud);
- #ifdef MHE
- if (mhe)
- (void) fclose (mhe);
- ! #endif MHE
- if (noisy)
- (void) fflush (stdout);
- #ifdef POP
- if (host && file)
- done (0);
- ! #endif POP
-
- /* */
-
- #ifdef POP
- if (host == NULL)
- ! #endif POP
- if (trnflag) {
- if (stat (newmail, &st) != NOTOK && s1.st_mtime != st.st_mtime)
- advise (NULLCP, "new messages have arrived!\007");
- --- 753,798 ----
- }
- #ifdef POP
- }
- ! #endif /* POP */
- ! #ifndef POP
- ! if (i < 0) { /* error } */
- ! #else
- ! if (p < 0) { /* error */
- ! #endif
- ! if (locked)
- ! #ifdef MAILGROUP
- ! {
- ! setgid(return_gid); /* Be sure we can unlock mail file */
- ! #endif /* MAILGROUP */
-
- + (void) lkfclose (in, newmail);
- + #ifdef MAILGROUP
- + setgid(getgid()); /* And then return us to normal privileges */
- + }
- + #endif /* MAILGROUP */
- + else
- + (void) fclose (in);
- + adios (NULLCP, "failed");
- + }
- +
- if (aud)
- (void) fclose (aud);
- #ifdef MHE
- if (mhe)
- (void) fclose (mhe);
- ! #endif /* MHE */
- if (noisy)
- (void) fflush (stdout);
- #ifdef POP
- if (host && file)
- done (0);
- ! #endif /* POP */
-
- /* */
-
- #ifdef POP
- if (host == NULL)
- ! #endif /* POP */
- if (trnflag) {
- if (stat (newmail, &st) != NOTOK && s1.st_mtime != st.st_mtime)
- advise (NULLCP, "new messages have arrived!\007");
- ***************
- *** 694,702 ****
-
- #ifdef POP
- if (host == NULL)
- ! #endif POP
- if (locked)
- ! (void) lkfclose (in, newmail);
- else
- (void) fclose (in);
-
- --- 823,840 ----
-
- #ifdef POP
- if (host == NULL)
- ! #endif /* POP */
- if (locked)
- ! #ifdef MAILGROUP
- ! {
- ! setgid(return_gid); /* Be sure we can unlock mail file */
- ! #endif /* MAILGROUP */
- !
- ! (void) lkfclose (in, newmail);
- ! #ifdef MAILGROUP
- ! setgid(getgid()); /* And then return us to normal privileges */
- ! }
- ! #endif /* MAILGROUP */
- else
- (void) fclose (in);
-
- ***************
- *** 721,726 ****
- --- 859,865 ----
- }
- switch (scan (in, msgnum, 0, nfs, width,
- msgnum == mp -> curmsg,
- + 1, /* check UNSEEN? */
- 0,
- fstat (fileno (in), &st) != NOTOK ? (long) st.st_size
- : 0L,
- ***************
- *** 740,746 ****
- if (noisy)
- (void) fflush (stdout);
- }
- ! #endif TMA
-
- done (0);
- }
- --- 879,885 ----
- if (noisy)
- (void) fflush (stdout);
- }
- ! #endif /* TMA */
-
- done (0);
- }
- ***************
- *** 756,762 ****
-
- exit (status);
- }
- ! #endif POP
- /* */
-
- #ifdef MF
- --- 895,901 ----
-
- exit (status);
- }
- ! #endif /* POP */
- /* */
-
- #ifdef MF
- ***************
- *** 785,791 ****
- break;
- }
- }
- ! #endif MF
-
- /* */
-
- --- 924,930 ----
- break;
- }
- }
- ! #endif /* MF */
-
- /* */
-
- ***************
- *** 830,833 ****
- (void) close (md);
- return (d.d_id);
- }
- ! #endif POP
- --- 969,972 ----
- (void) close (md);
- return (d.d_id);
- }
- ! #endif /* POP */
- *** ../mh-6.7.2/uip/install-mh.c Thu Apr 5 16:03:43 1990
- --- uip/install-mh.c Mon Dec 14 16:21:11 1992
- ***************
- *** 1,7 ****
- /* install-mh.c - initialize the MH environment */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: install-mh.c,v 1.3 90/04/05 15:01:19 sources Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include <pwd.h>
- --- 1,7 ----
- /* install-mh.c - initialize the MH environment */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: install-mh.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include <pwd.h>
- ***************
- *** 8,13 ****
- --- 8,16 ----
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
- /* */
-
- ***************
- *** 23,29 ****
- --- 26,36 ----
-
- static char *geta ();
-
- + #ifndef __STDC__
- + #ifdef SYS5
- struct passwd *getpwuid ();
- + #endif
- + #endif /* !__STDC__ */
-
- /* */
-
- ***************
- *** 43,48 ****
- --- 50,58 ----
- FILE *in,
- *out;
-
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- invo_name = r1bindex (argv[0], '/');
-
- #ifdef COMPAT
- ***************
- *** 69,75 ****
-
- done (0);
- }
- ! #endif COMPAT
-
- autof = (argc == 2 && strcmp (argv[1], "-auto") == 0);
- if (mypath == NULL) { /* straight from m_getdefs... */
- --- 79,85 ----
-
- done (0);
- }
- ! #endif /* COMPAT */
-
- autof = (argc == 2 && strcmp (argv[1], "-auto") == 0);
- if (mypath == NULL) { /* straight from m_getdefs... */
- ***************
- *** 78,89 ****
- else
- if ((pw = getpwuid (getuid ())) == NULL
- || pw -> pw_dir == NULL
- ! || *pw -> pw_dir == NULL)
- adios (NULLCP, "no HOME envariable");
- else
- mypath = getcpy (pw -> pw_dir);
- if ((cp = mypath + strlen (mypath) - 1) > mypath && *cp == '/')
- ! *cp = NULL;
- }
- defpath = concat (mypath, "/", mh_profile, NULLCP);
-
- --- 88,99 ----
- else
- if ((pw = getpwuid (getuid ())) == NULL
- || pw -> pw_dir == NULL
- ! || *pw -> pw_dir == 0)
- adios (NULLCP, "no HOME envariable");
- else
- mypath = getcpy (pw -> pw_dir);
- if ((cp = mypath + strlen (mypath) - 1) > mypath && *cp == '/')
- ! *cp = 0;
- }
- defpath = concat (mypath, "/", mh_profile, NULLCP);
-
- ***************
- *** 189,194 ****
- if (fgets (line, sizeof line, stdin) == NULL)
- done (1);
- if (cp = index (line, '\n'))
- ! *cp = NULL;
- return line;
- }
- --- 199,204 ----
- if (fgets (line, sizeof line, stdin) == NULL)
- done (1);
- if (cp = index (line, '\n'))
- ! *cp = 0;
- return line;
- }
- *** ../mh-6.7.2/uip/mark.c Thu Oct 29 15:02:26 1987
- --- uip/mark.c Mon Dec 14 16:21:12 1992
- ***************
- *** 1,7 ****
- --- 1,13 ----
- /* mark.c - mark messages */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: mark.c,v 1.4 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
- /* */
-
- ***************
- *** 32,38 ****
- #define DEBUGSW 9
- "debug", -5,
-
- ! NULL, NULL
- };
-
- /* */
- --- 38,44 ----
- #define DEBUGSW 9
- "debug", -5,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 64,69 ****
- --- 70,78 ----
- *msgs[MAXARGS];
- struct msgs *mp;
-
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- invo_name = r1bindex (argv[0], '/');
- if ((cp = m_find (invo_name)) != NULL) {
- ap = brkstring (cp = getcpy (cp), " ", "\n");
- ***************
- *** 190,199 ****
- #ifndef MTR
- printf ("lowoff=%d hghoff=%d\n",
- mp -> lowoff, mp -> hghoff);
- ! #else MTR
- printf ("lowoff=%d hghoff=%d msgbase=0x%x msgstats=0x%x\n",
- mp -> lowoff, mp -> hghoff, mp -> msgbase, mp -> msgstats);
- ! #endif MTR
- }
-
- if (seqp == 0 && (addsw || deletesw))
- --- 199,208 ----
- #ifndef MTR
- printf ("lowoff=%d hghoff=%d\n",
- mp -> lowoff, mp -> hghoff);
- ! #else /* MTR */
- printf ("lowoff=%d hghoff=%d msgbase=0x%x msgstats=0x%x\n",
- mp -> lowoff, mp -> hghoff, mp -> msgbase, mp -> msgstats);
- ! #endif /* MTR */
- }
-
- if (seqp == 0 && (addsw || deletesw))
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- uip/md5.c Mon Oct 26 08:48:09 1992
- ***************
- *** 0 ****
- --- 1,338 ----
- + #ifndef lint
- + static char md5ident[]="@(#)$Id: md5.c,v 1.4 1992/10/26 16:48:02 jromine Exp $";
- + #endif
- + /* taken from RFC-1321/Appendix A.3 */
- +
- + /* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm
- + */
- +
- + /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
- + rights reserved.
- +
- + License to copy and use this software is granted provided that it
- + is identified as the "RSA Data Security, Inc. MD5 Message-Digest
- + Algorithm" in all material mentioning or referencing this software
- + or this function.
- +
- + License is also granted to make and use derivative works provided
- + that such works are identified as "derived from the RSA Data
- + Security, Inc. MD5 Message-Digest Algorithm" in all material
- + mentioning or referencing the derived work.
- +
- + RSA Data Security, Inc. makes no representations concerning either
- + the merchantability of this software or the suitability of this
- + software for any particular purpose. It is provided "as is"
- + without express or implied warranty of any kind.
- +
- + These notices must be retained in any copies of any part of this
- + documentation and/or software.
- + */
- +
- + /* #include "global.h" */
- + #include "../h/md5.h"
- +
- + /* Constants for MD5Transform routine.
- + */
- + #define S11 7
- + #define S12 12
- + #define S13 17
- + #define S14 22
- + #define S21 5
- + #define S22 9
- + #define S23 14
- + #define S24 20
- + #define S31 4
- + #define S32 11
- + #define S33 16
- + #define S34 23
- + #define S41 6
- + #define S42 10
- + #define S43 15
- + #define S44 21
- +
- + static void MD5Transform PROTO_LIST ((UINT4 [4], unsigned char [64]));
- + static void Encode PROTO_LIST
- + ((unsigned char *, UINT4 *, unsigned int));
- + static void Decode PROTO_LIST
- + ((UINT4 *, unsigned char *, unsigned int));
- + static void MD5_memcpy PROTO_LIST ((POINTER, POINTER, unsigned int));
- + static void MD5_memset PROTO_LIST ((POINTER, int, unsigned int));
- +
- + static unsigned char PADDING[64] = {
- + 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
- + };
- +
- + /* F, G, H and I are basic MD5 functions.
- + */
- + #define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
- + #define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
- + #define H(x, y, z) ((x) ^ (y) ^ (z))
- + #define I(x, y, z) ((y) ^ ((x) | (~z)))
- +
- + /* ROTATE_LEFT rotates x left n bits.
- + */
- + #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
- +
- + /* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
- + Rotation is separate from addition to prevent recomputation.
- + */
- + #define FF(a, b, c, d, x, s, ac) { \
- + (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
- + (a) = ROTATE_LEFT ((a), (s)); \
- + (a) += (b); \
- + }
- + #define GG(a, b, c, d, x, s, ac) { \
- + (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
- + (a) = ROTATE_LEFT ((a), (s)); \
- + (a) += (b); \
- + }
- + #define HH(a, b, c, d, x, s, ac) { \
- + (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \
- + (a) = ROTATE_LEFT ((a), (s)); \
- + (a) += (b); \
- + }
- + #define II(a, b, c, d, x, s, ac) { \
- + (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \
- + (a) = ROTATE_LEFT ((a), (s)); \
- + (a) += (b); \
- + }
- +
- + /* MD5 initialization. Begins an MD5 operation, writing a new context.
- + */
- + void MD5Init (context)
- + MD5_CTX *context; /* context */
- + {
- + context->count[0] = context->count[1] = 0;
- + /* Load magic initialization constants.
- + */
- + context->state[0] = 0x67452301;
- + context->state[1] = 0xefcdab89;
- + context->state[2] = 0x98badcfe;
- + context->state[3] = 0x10325476;
- + }
- +
- + /* MD5 block update operation. Continues an MD5 message-digest
- + operation, processing another message block, and updating the
- + context.
- + */
- + void MD5Update (context, input, inputLen)
- + MD5_CTX *context; /* context */
- + unsigned char *input; /* input block */
- + unsigned int inputLen; /* length of input block */
- + {
- + unsigned int i, index, partLen;
- +
- + /* Compute number of bytes mod 64 */
- + index = (unsigned int)((context->count[0] >> 3) & 0x3F);
- +
- + /* Update number of bits */
- + if ((context->count[0] += ((UINT4)inputLen << 3))
- + < ((UINT4)inputLen << 3))
- + context->count[1]++;
- + context->count[1] += ((UINT4)inputLen >> 29);
- +
- + partLen = 64 - index;
- +
- + /* Transform as many times as possible.
- + */
- + if (inputLen >= partLen) {
- + MD5_memcpy
- + ((POINTER)&context->buffer[index], (POINTER)input, partLen);
- + MD5Transform (context->state, context->buffer);
- +
- + for (i = partLen; i + 63 < inputLen; i += 64)
- + MD5Transform (context->state, &input[i]);
- +
- + index = 0;
- + }
- + else
- + i = 0;
- +
- + /* Buffer remaining input */
- + MD5_memcpy
- + ((POINTER)&context->buffer[index], (POINTER)&input[i],
- + inputLen-i);
- + }
- +
- + /* MD5 finalization. Ends an MD5 message-digest operation, writing the
- + the message digest and zeroizing the context.
- + */
- + void MD5Final (digest, context)
- + unsigned char digest[16]; /* message digest */
- + MD5_CTX *context; /* context */
- + {
- + unsigned char bits[8];
- + unsigned int index, padLen;
- +
- + /* Save number of bits */
- + Encode (bits, context->count, 8);
- +
- + /* Pad out to 56 mod 64.
- + */
- + index = (unsigned int)((context->count[0] >> 3) & 0x3f);
- + padLen = (index < 56) ? (56 - index) : (120 - index);
- + MD5Update (context, PADDING, padLen);
- +
- + /* Append length (before padding) */
- + MD5Update (context, bits, 8);
- + /* Store state in digest */
- + Encode (digest, context->state, 16);
- +
- + /* Zeroize sensitive information.
- + */
- + MD5_memset ((POINTER)context, 0, sizeof (*context));
- + }
- +
- + /* MD5 basic transformation. Transforms state based on block.
- + */
- + static void MD5Transform (state, block)
- + UINT4 state[4];
- + unsigned char block[64];
- + {
- + UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
- +
- + Decode (x, block, 64);
- +
- + /* Round 1 */
- + FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
- + FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
- + FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
- + FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
- + FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
- + FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
- + FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
- + FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
- + FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
- + FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
- + FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
- + FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
- + FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
- + FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
- + FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
- + FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
- +
- + /* Round 2 */
- + GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
- + GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
- + GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
- + GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
- + GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
- + GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */
- + GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
- + GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
- + GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
- + GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
- + GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
- + GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
- + GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
- + GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
- + GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
- + GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
- +
- + /* Round 3 */
- + HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
- + HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
- + HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
- + HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
- + HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
- + HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
- + HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
- + HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
- + HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
- + HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
- + HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
- + HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */
- + HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
- + HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
- + HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
- + HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
- +
- + /* Round 4 */
- + II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
- + II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
- + II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
- + II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
- + II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
- + II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
- + II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
- + II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
- + II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
- + II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
- + II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
- + II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
- + II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
- + II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
- + II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
- + II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
- +
- + state[0] += a;
- + state[1] += b;
- + state[2] += c;
- + state[3] += d;
- +
- + /* Zeroize sensitive information.
- + */
- + MD5_memset ((POINTER)x, 0, sizeof (x));
- + }
- +
- + /* Encodes input (UINT4) into output (unsigned char). Assumes len is
- + a multiple of 4.
- + */
- + static void Encode (output, input, len)
- + unsigned char *output;
- + UINT4 *input;
- + unsigned int len;
- + {
- + unsigned int i, j;
- +
- + for (i = 0, j = 0; j < len; i++, j += 4) {
- + output[j] = (unsigned char)(input[i] & 0xff);
- + output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
- + output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
- + output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
- + }
- + }
- +
- + /* Decodes input (unsigned char) into output (UINT4). Assumes len is
- + a multiple of 4.
- + */
- + static void Decode (output, input, len)
- + UINT4 *output;
- + unsigned char *input;
- + unsigned int len;
- + {
- + unsigned int i, j;
- +
- + for (i = 0, j = 0; j < len; i++, j += 4)
- + output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
- + (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
- + }
- +
- + /* Note: Replace "for loop" with standard memcpy if possible.
- + */
- +
- + static void MD5_memcpy (output, input, len)
- + POINTER output;
- + POINTER input;
- + unsigned int len;
- + {
- + unsigned int i;
- +
- + for (i = 0; i < len; i++)
- + output[i] = input[i];
- + }
- +
- + /* Note: Replace "for loop" with standard memset if possible.
- + */
- + static void MD5_memset (output, value, len)
- + POINTER output;
- + int value;
- + unsigned int len;
- + {
- + unsigned int i;
- +
- + for (i = 0; i < len; i++)
- + ((char *)output)[i] = (char)value;
- + }
- *** ../mh-6.7.2/uip/mhl.c Thu Oct 29 15:02:26 1987
- --- uip/mhl.c Mon Dec 14 16:21:13 1992
- ***************
- *** 1,10 ****
- /* mhl.c - the MH message listing program */
-
- -
- main (argc, argv)
- int argc;
- char **argv;
- {
- done (mhl (argc, argv));
- }
-
- --- 1,18 ----
- /* mhl.c - the MH message listing program */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: mhl.c,v 1.3 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
- main (argc, argv)
- int argc;
- char **argv;
- {
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- done (mhl (argc, argv));
- }
-
- *** ../mh-6.7.2/uip/mhlsbr.c Fri Jan 25 14:49:56 1991
- --- uip/mhlsbr.c Mon Dec 14 16:21:14 1992
- ***************
- *** 1,12 ****
- /* mhlsbr.c - implement the "nifty" message lister */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mhlsbr.c,v 1.16 91/01/25 14:49:46 mh Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include "../h/addrsbr.h"
- #include "../h/formatsbr.h"
- #include "../zotnet/tws.h"
- #include <ctype.h>
- #include <setjmp.h>
- #include <signal.h>
- --- 1,19 ----
- /* mhlsbr.c - implement the "nifty" message lister */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mhlsbr.c,v 1.28 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include "../h/addrsbr.h"
- #include "../h/formatsbr.h"
- #include "../zotnet/tws.h"
- + #ifdef SVR4
- + #undef NULLVP /* XXX */
- + #endif
- + #if defined(SYS5) && defined(AUX)
- + #define u_short ushort
- + #define u_long ulong
- + #endif
- #include <ctype.h>
- #include <setjmp.h>
- #include <signal.h>
- ***************
- *** 36,42 ****
-
- #ifdef SYS5
- #define u_short ushort
- ! #endif SYS5
-
- #define ONECOMP 0
- #define TWOCOMP 1
- --- 43,49 ----
-
- #ifdef SYS5
- #define u_short ushort
- ! #endif /* SYS5 */
-
- #define ONECOMP 0
- #define TWOCOMP 1
- ***************
- *** 101,108 ****
- "volume number", -6,
- #define ISSUESW 20
- "issue number", -5,
-
- ! NULL, NULL
- };
-
- /* */
- --- 108,117 ----
- "volume number", -6,
- #define ISSUESW 20
- "issue number", -5,
- + #define NBODYSW 21
- + "nobody", -6,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 139,145 ****
- #define FACEFMT 0x004000/* contains face */
- #define FACEDFLT 0x008000/* default for face */
- #define SPLIT 0x010000/* split headers (don't concatenate) */
- ! #define LBITS "\020\01NOCOMPONENT\02UPPERCASE\03CENTER\04CLEARTEXT\05EXTRA\06HDROUTPUT\07CLEARSCR\010LEFTADJUST\011COMPRESS\012ADDRFMT\013BELL\014DATEFMT\015FORMAT\016INIT\017FACEFMT\020FACEDFLT\021SPLIT"
- #define GFLAGS (NOCOMPONENT | UPPERCASE | CENTER | LEFTADJUST | COMPRESS \
- | SPLIT)
-
- --- 148,155 ----
- #define FACEFMT 0x004000/* contains face */
- #define FACEDFLT 0x008000/* default for face */
- #define SPLIT 0x010000/* split headers (don't concatenate) */
- ! #define NONEWLINE 0x020000/* don't write trailing newline */
- ! #define LBITS "\020\01NOCOMPONENT\02UPPERCASE\03CENTER\04CLEARTEXT\05EXTRA\06HDROUTPUT\07CLEARSCR\010LEFTADJUST\011COMPRESS\012ADDRFMT\013BELL\014DATEFMT\015FORMAT\016INIT\017FACEFMT\020FACEDFLT\021SPLIT\022NONEWLINE"
- #define GFLAGS (NOCOMPONENT | UPPERCASE | CENTER | LEFTADJUST | COMPRESS \
- | SPLIT)
-
- ***************
- *** 152,162 ****
- static struct mcomp *fmttl = NULL;
-
- static struct mcomp global = {
- ! NULL, NULL, "", NULL, NULL, 0, -1, 80, -1, 40, BELL, NULL
- };
- static struct mcomp holder =
- {
- ! NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, NOCOMPONENT, NULL
- };
-
-
- --- 162,172 ----
- static struct mcomp *fmttl = NULL;
-
- static struct mcomp global = {
- ! NULL, NULL, "", NULL, NULL, 0, -1, 80, -1, 40, BELL, 0
- };
- static struct mcomp holder =
- {
- ! NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, NOCOMPONENT, 0
- };
-
-
- ***************
- *** 206,211 ****
- --- 216,223 ----
- "bell", BELL, 0,
- "nobell", 0, BELL,
- "datefield", DATEFMT, ADDRFMT,
- + "newline", 0, NONEWLINE,
- + "nonewline", NONEWLINE, 0,
-
- NULL
- };
- ***************
- *** 215,220 ****
- --- 227,233 ----
- static int bellflg = 0;
- static int clearflg = 0;
- static int dashflg = 1;
- + static int dobody = 1;
- static int forwflg = 0;
- static int forwall = 0;
-
- ***************
- *** 256,262 ****
-
-
- static char delim3[] = /* from forw.c */
- ! "\n------------------------------------------------------------\n\n";
- static char delim4[] = "\n------------------------------\n\n";
-
-
- --- 269,275 ----
-
-
- static char delim3[] = /* from forw.c */
- ! "\n----------------------------------------------------------------------\n\n";
- static char delim4[] = "\n------------------------------\n\n";
-
-
- ***************
- *** 264,270 ****
-
-
- static void mhladios (), mhldone ();
- ! static int intrser (), pipeser (), quitser ();
- static char *mcomp_add (), *oneline (), *parse ();
- static struct mcomp *add_queue ();
-
- --- 277,283 ----
-
-
- static void mhladios (), mhldone ();
- ! static TYPESIG intrser (), pipeser (), quitser ();
- static char *mcomp_add (), *oneline (), *parse ();
- static struct mcomp *add_queue ();
-
- ***************
- *** 415,420 ****
- --- 428,437 ----
- case NDASHSW:
- dashflg = 0;
- continue;
- +
- + case NBODYSW:
- + dobody = 0;
- + continue;
- }
- files[vecp++] = cp;
- }
- ***************
- *** 461,467 ****
- for (cp = buf + i; i > 1; i--)
- *cp++ = '*';
- *cp++ = '\n';
- ! *cp = NULL;
- printf ("%s", buf);
- }
- else
- --- 478,484 ----
- for (cp = buf + i; i > 1; i--)
- *cp++ = '*';
- *cp++ = '\n';
- ! *cp = 0;
- printf ("%s", buf);
- }
- else
- ***************
- *** 532,538 ****
- continue;
-
- if (cp = index (bp, '\n'))
- ! *cp = NULL;
-
- if (*bp == ':') {
- c1 = add_queue (&fmthd, &fmttl, NULLCP, bp + 1, CLEARTEXT);
- --- 549,555 ----
- continue;
-
- if (cp = index (bp, '\n'))
- ! *cp = 0;
-
- if (*bp == ':') {
- c1 = add_queue (&fmthd, &fmttl, NULLCP, bp + 1, CLEARTEXT);
- ***************
- *** 715,721 ****
- if (!*++parptr)
- parptr--;
- c = *parptr;
- ! *parptr = NULL;
- *s = getcpy (cp);
- if ((*parptr = c) == '"')
- parptr++;
- --- 732,738 ----
- if (!*++parptr)
- parptr--;
- c = *parptr;
- ! *parptr = 0;
- *s = getcpy (cp);
- if ((*parptr = c) == '"')
- parptr++;
- ***************
- *** 739,745 ****
- *cp++ = c;
- else
- break;
- ! *cp = NULL;
-
- return result;
- }
- --- 756,762 ----
- *cp++ = c;
- else
- break;
- ! *cp = 0;
-
- return result;
- }
- ***************
- *** 843,849 ****
- printf ("Press <return> to list \"%s\"...", mname);
- }
- (void) fflush (stdout);
- ! buf[0] = NULL;
- (void) read (fileno (stdout), buf, sizeof buf);
- }
- if (index (buf, '\n')) {
- --- 860,866 ----
- printf ("Press <return> to list \"%s\"...", mname);
- }
- (void) fflush (stdout);
- ! buf[0] = 0;
- (void) read (fileno (stdout), buf, sizeof buf);
- }
- if (index (buf, '\n')) {
- ***************
- *** 924,930 ****
- putcomp (c1, c2, TWOCOMP);
- continue;
- }
- ! if (uleq (c1 -> c_name, "body")) {
- if ((holder.c_text = malloc (sizeof buf)) == NULL)
- adios (NULLCP, "unable to allocate buffer memory");
- (void) strcpy (holder.c_text, buf);
- --- 941,947 ----
- putcomp (c1, c2, TWOCOMP);
- continue;
- }
- ! if (dobody && uleq (c1 -> c_name, "body")) {
- if ((holder.c_text = malloc (sizeof buf)) == NULL)
- adios (NULLCP, "unable to allocate buffer memory");
- (void) strcpy (holder.c_text, buf);
- ***************
- *** 979,985 ****
- if (uleq (ap -> p_name, name))
- return (ap -> p_flags);
-
- ! return NULL;
- }
-
-
- --- 996,1002 ----
- if (uleq (ap -> p_name, name))
- return (ap -> p_flags);
-
- ! return 0;
- }
-
-
- ***************
- *** 994,1000 ****
- return add (s1, s2);
-
- if (s2 && *(dp = s2 + strlen (s2) - 1) == '\n')
- ! *dp = NULL;
-
- return add (s1, add (",\n", s2));
- }
- --- 1011,1017 ----
- return add (s1, s2);
-
- if (s2 && *(dp = s2 + strlen (s2) - 1) == '\n')
- ! *dp = 0;
-
- return add (s1, add (",\n", s2));
- }
- ***************
- *** 1012,1018 ****
- register struct mcomp *c1,
- *c2;
- {
- ! int dat[4];
- register char *ap,
- *cp;
- char buffer[BUFSIZ],
- --- 1029,1035 ----
- register struct mcomp *c1,
- *c2;
- {
- ! int dat[5];
- register char *ap,
- *cp;
- char buffer[BUFSIZ],
- ***************
- *** 1025,1031 ****
-
- ap = c2 -> c_text;
- c2 -> c_text = NULL;
- ! dat[0] = dat[1] = dat[2] = 0;
- dat[3] = sizeof buffer - 1;
- (void) fmt_compile (c1 -> c_nfs, &c1 -> c_fmt);
-
- --- 1042,1048 ----
-
- ap = c2 -> c_text;
- c2 -> c_text = NULL;
- ! dat[0] = dat[1] = dat[2] = dat[4] = 0;
- dat[3] = sizeof buffer - 1;
- (void) fmt_compile (c1 -> c_nfs, &c1 -> c_fmt);
-
- ***************
- *** 1033,1038 ****
- --- 1050,1058 ----
- FINDCOMP (cptr, "text");
- if (cptr)
- cptr -> c_text = ap;
- + if (cp = rindex(ap, '\n')) /* drop ending newline */
- + if (!cp[1])
- + *cp = 0;
-
- (void) fmtscan (c1 -> c_fmt, buffer, sizeof buffer - 1, dat);
- /* Don't need to append a newline, dctime() already did */
- ***************
- *** 1080,1086 ****
- if (c2 -> c_text)
- c2 -> c_text = add (",\n", c2 -> c_text);
- if (*(cp = buffer + strlen (buffer) - 1) == '\n')
- ! *cp = NULL;
- c2 -> c_text = add (buffer, c2 -> c_text);
- }
-
- --- 1100,1106 ----
- if (c2 -> c_text)
- c2 -> c_text = add (",\n", c2 -> c_text);
- if (*(cp = buffer + strlen (buffer) - 1) == '\n')
- ! *cp = 0;
- c2 -> c_text = add (buffer, c2 -> c_text);
- }
-
- ***************
- *** 1266,1272 ****
- : strlen (c1->c_text ? c1->c_text : c1->c_name) + 2;
- count += c1 -> c_offset;
-
- ! putstr (oneline (c2 -> c_text, c1 -> c_flags));
- if (term == '\n')
- putstr ("\n");
- while (cp = oneline (c2 -> c_text, c1 -> c_flags)) {
- --- 1286,1293 ----
- : strlen (c1->c_text ? c1->c_text : c1->c_name) + 2;
- count += c1 -> c_offset;
-
- ! if (cp = oneline (c2 -> c_text, c1 -> c_flags))
- ! putstr(cp);
- if (term == '\n')
- putstr ("\n");
- while (cp = oneline (c2 -> c_text, c1 -> c_flags)) {
- ***************
- *** 1293,1299 ****
-
- if (onelp == NULL)
- onelp = stuff;
- ! if (*onelp == NULL)
- return (onelp = NULL);
-
- ret = onelp;
- --- 1314,1320 ----
-
- if (onelp == NULL)
- onelp = stuff;
- ! if (*onelp == 0)
- return (onelp = NULL);
-
- ret = onelp;
- ***************
- *** 1303,1309 ****
- if (isspace (*onelp)) {
- if (*onelp == '\n' && (!onelp[1] || (flags & ADDRFMT))) {
- term = '\n';
- ! *onelp++ = NULL;
- break;
- }
- else
- --- 1324,1330 ----
- if (isspace (*onelp)) {
- if (*onelp == '\n' && (!onelp[1] || (flags & ADDRFMT))) {
- term = '\n';
- ! *onelp++ = 0;
- break;
- }
- else
- ***************
- *** 1317,1323 ****
- spc = 0;
- }
-
- ! *cp = NULL;
- }
- else {
- while (*onelp && *onelp != '\n')
- --- 1338,1344 ----
- spc = 0;
- }
-
- ! *cp = 0;
- }
- else {
- while (*onelp && *onelp != '\n')
- ***************
- *** 1324,1335 ****
- onelp++;
- if (*onelp == '\n') {
- term = '\n';
- ! *onelp++ = NULL;
- }
- if (flags & LEFTADJUST)
- while (*ret == ' ' || *ret == '\t')
- ret++;
- }
-
- return ret;
- }
- --- 1345,1358 ----
- onelp++;
- if (*onelp == '\n') {
- term = '\n';
- ! *onelp++ = 0;
- }
- if (flags & LEFTADJUST)
- while (*ret == ' ' || *ret == '\t')
- ret++;
- }
- + if (*onelp == 0 && term == '\n' && (flags & NONEWLINE))
- + term = 0;
-
- return ret;
- }
- ***************
- *** 1375,1381 ****
- if (global.c_flags & BELL)
- (void) putchar ('\007');
- (void) fflush (stdout);
- ! buf[0] = NULL;
- (void) read (fileno (stdout), buf, sizeof buf);
- if (index (buf, '\n')) {
- if (global.c_flags & CLEARSCR)
- --- 1398,1404 ----
- if (global.c_flags & BELL)
- (void) putchar ('\007');
- (void) fflush (stdout);
- ! buf[0] = 0;
- (void) read (fileno (stdout), buf, sizeof buf);
- if (index (buf, '\n')) {
- if (global.c_flags & CLEARSCR)
- ***************
- *** 1425,1436 ****
-
- /* ARGSUSED */
-
- ! static int intrser (i)
- int i;
- {
- #ifndef BSD42
- (void) signal (SIGINT, intrser);
- ! #endif BSD42
-
- discard (stdout);
- (void) putchar ('\n');
- --- 1448,1459 ----
-
- /* ARGSUSED */
-
- ! static TYPESIG intrser (i)
- int i;
- {
- #ifndef BSD42
- (void) signal (SIGINT, intrser);
- ! #endif /* BSD42 */
-
- discard (stdout);
- (void) putchar ('\n');
- ***************
- *** 1441,1452 ****
-
- /* ARGSUSED */
-
- ! static int pipeser (i)
- int i;
- {
- #ifndef BSD42
- (void) signal (SIGPIPE, pipeser);
- ! #endif BSD42
-
- done (NOTOK);
- }
- --- 1464,1475 ----
-
- /* ARGSUSED */
-
- ! static TYPESIG pipeser (i)
- int i;
- {
- #ifndef BSD42
- (void) signal (SIGPIPE, pipeser);
- ! #endif /* BSD42 */
-
- done (NOTOK);
- }
- ***************
- *** 1454,1465 ****
-
- /* ARGSUSED */
-
- ! static int quitser (i)
- int i;
- {
- #ifndef BSD42
- (void) signal (SIGQUIT, quitser);
- ! #endif BSD42
-
- (void) putchar ('\n');
- (void) fflush (stdout);
- --- 1477,1488 ----
-
- /* ARGSUSED */
-
- ! static TYPESIG quitser (i)
- int i;
- {
- #ifndef BSD42
- (void) signal (SIGQUIT, quitser);
- ! #endif /* BSD42 */
-
- (void) putchar ('\n');
- (void) fflush (stdout);
- ***************
- *** 1566,1572 ****
- return (result != NOTOK ? OK : NOTOK);
- }
-
- ! #else not BSD42 and not SOCKETS
-
- static int doface (c1)
- register struct mcomp *c1;
- --- 1589,1595 ----
- return (result != NOTOK ? OK : NOTOK);
- }
-
- ! #else /* not BSD42 and not SOCKETS */
-
- static int doface (c1)
- register struct mcomp *c1;
- ***************
- *** 1675,1681 ****
-
- return result;
- }
- ! #endif not BSD42 and not SOCKETS
-
- /* */
-
- --- 1698,1704 ----
-
- return result;
- }
- ! #endif /* not BSD42 and not SOCKETS */
-
- /* */
-
- *** ../mh-6.7.2/uip/mhmail.c Thu Apr 5 16:03:43 1990
- --- uip/mhmail.c Mon Dec 14 16:21:15 1992
- ***************
- *** 1,11 ****
- /* mhmail.c - simple mail program */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mhmail.c,v 1.3 90/04/05 15:01:25 sources Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include <stdio.h>
- #include <signal.h>
-
- /* */
-
- --- 1,14 ----
- /* mhmail.c - simple mail program */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mhmail.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- #include <signal.h>
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
- /* */
-
- ***************
- *** 20,36 ****
- "from addr", 0,
-
- #define SUBJSW 3
- ! "subject", 0,
-
- #define HELPSW 4
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
-
- ! static int intrser ();
-
-
- static char tmpfil[BUFSIZ];
- --- 23,42 ----
- "from addr", 0,
-
- #define SUBJSW 3
- ! "subject text", 0,
-
- #define HELPSW 4
- "help", 4,
-
- ! #define RESNDSW 5
- ! "resent", -6,
- !
- ! NULL, 0
- };
-
- /* */
-
- ! static TYPESIG intrser ();
-
-
- static char tmpfil[BUFSIZ];
- ***************
- *** 47,52 ****
- --- 53,59 ----
- status,
- i,
- iscc = 0,
- + resent = 0,
- somebody;
- char *cp,
- *tolist = NULL,
- ***************
- *** 58,63 ****
- --- 65,73 ----
- buf[100];
- FILE * out;
-
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- invo_name = r1bindex (argv[0], '/');
- m_foil (NULLCP);
-
- ***************
- *** 102,107 ****
- --- 112,121 ----
- if (!(subject = *argp++) || *subject == '-')
- adios (NULLCP, "missing argument to %s", argp[-2]);
- continue;
- +
- + case RESNDSW:
- + resent++;
- + continue;
- }
- if (iscc)
- cclist = cclist ? add (cp, add (", ", cclist)) : getcpy (cp);
- ***************
- *** 120,133 ****
-
- setsig (SIGINT, intrser);
-
- ! fprintf (out, "To: %s\n", tolist);
- if (cclist)
- ! fprintf (out, "cc: %s\n", cclist);
- if (subject)
- ! fprintf (out, "Subject: %s\n", subject);
- if (from)
- ! fprintf (out, "From: %s\n", from);
- ! (void) fputs ("\n", out);
-
- if (body) {
- fprintf (out, "%s", body);
- --- 134,148 ----
-
- setsig (SIGINT, intrser);
-
- ! fprintf (out, "%sTo: %s\n", resent ? "Resent-" : "", tolist);
- if (cclist)
- ! fprintf (out, "%scc: %s\n", resent ? "Resent-" : "", cclist);
- if (subject)
- ! fprintf (out, "%sSubject: %s\n", resent ? "Resent-" : "", subject);
- if (from)
- ! fprintf (out, "%sFrom: %s\n", resent ? "Resent-" : "", from);
- ! if (!resent)
- ! (void) fputs ("\n", out);
-
- if (body) {
- fprintf (out, "%s", body);
- ***************
- *** 156,162 ****
- admonish (NULLCP, "unable to fork");
-
- case OK:
- ! execlp (postproc, r1bindex (postproc, '/'), tmpfil, NULLCP);
- fprintf (stderr, "unable to exec ");
- perror (postproc);
- _exit (-1);
- --- 171,178 ----
- admonish (NULLCP, "unable to fork");
-
- case OK:
- ! execlp (postproc, r1bindex (postproc, '/'), tmpfil,
- ! resent ? "-dist" : NULLCP, NULLCP);
- fprintf (stderr, "unable to exec ");
- perror (postproc);
- _exit (-1);
- ***************
- *** 179,191 ****
-
- /* ARGSUSED */
-
- ! static int intrser (i)
- int i;
- {
- #ifndef BSD42
- if (i)
- (void) signal (i, SIG_IGN);
- ! #endif BSD42
-
- (void) unlink (tmpfil);
- done (i != 0 ? 1 : 0);
- --- 195,207 ----
-
- /* ARGSUSED */
-
- ! static TYPESIG intrser (i)
- int i;
- {
- #ifndef BSD42
- if (i)
- (void) signal (i, SIG_IGN);
- ! #endif /* BSD42 */
-
- (void) unlink (tmpfil);
- done (i != 0 ? 1 : 0);
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- uip/mhn.c Mon Dec 14 16:21:19 1992
- ***************
- *** 0 ****
- --- 1,6054 ----
- + /* mhn.c - multi-media MH */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: mhn.c,v 2.21 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
- +
- + #include "../h/mh.h"
- + #include <ctype.h>
- + #include <errno.h>
- + #include <setjmp.h>
- + #include <signal.h>
- + #include <stdio.h>
- + #include <sys/types.h>
- + #include <sys/stat.h>
- + #ifdef BSD42
- + #include <sys/wait.h>
- + #endif
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
- +
- + /* */
- +
- + static struct swit switches[] = {
- + #define AUTOSW 0
- + "auto", 0,
- + #define NAUTOSW 1
- + "noauto", 0,
- +
- + #define DEBUGSW 2
- + "debug", -5,
- +
- + #define EBCDICSW 3
- + "ebcdicsafe", 0,
- + #define NEBCDICSW 4
- + "noebcdicsafe", 0,
- +
- + #define FORMSW 5
- + "form formfile", 4,
- +
- + #define HEADSW 6
- + "headers", 0,
- + #define NHEADSW 7
- + "noheaders", 0,
- +
- + #define LISTSW 8
- + "list", 0,
- + #define NLISTSW 9
- + "nolist", 0,
- +
- + #define PARTSW 10
- + "part number", 0,
- +
- + #define SIZESW 11
- + "realsize", 0,
- + #define NSIZESW 12
- + "norealsize", 0,
- +
- + #define RFC934SW 13
- + "rfc934mode", 0,
- + #define NRFC934SW 14
- + "norfc934mode", 0,
- +
- + #define SERIALSW 15
- + "serialonly", 0,
- + #define NSERIALSW 16
- + "noserialonly", 0,
- +
- + #define SHOWSW 17
- + "show", 0,
- + #define NSHOWSW 18
- + "noshow", 0,
- +
- + #define STORESW 19
- + "store", 0,
- + #define NSTORESW 20
- + "nostore", 0,
- +
- + #define TYPESW 21
- + "type content", 0,
- +
- + #define VERBSW 22
- + "verbose", 0,
- + #define NVERBSW 23
- + "noverbose", 0,
- +
- + #define HELPSW 24
- + "help", 4,
- +
- + #define PROGSW 25
- + "moreproc program", -4,
- + #define NPROGSW 26
- + "nomoreproc", -3,
- +
- + #define LENSW 27
- + "length lines", -4,
- + #define WIDSW 28
- + "width columns", -4,
- +
- + #define FILESW 29 /* interface from show */
- + "file file", -4,
- +
- + #define VIAMSW 30
- + "viamail mailpath", -7,
- + #define VIASSW 31
- + "viasubj subject", -7,
- + #define VIAPSW 32
- + "viaparm arguments", -7,
- + #define VIADSW 33
- + "viadesc text", -7,
- + #define VIACSW 34
- + "viacmnt text", -7,
- + #define VIAZSW 35
- + "viadelay seconds", -8,
- + #define VIAFSW 36
- + "viafrom mailpath", -7,
- +
- + NULL, 0
- + };
- +
- + /* */
- +
- + #define NPARTS 50
- + #define NTYPES 20
- +
- + static int autosw = 0;
- + int debugsw = 0;
- + static int ebcdicsw = 0;
- + static char *formsw = NULLCP;
- + static int headsw = 1;
- + static int listsw = 0;
- + static int nomore = 0;
- + static int npart = 0;
- + static char *parts[NPARTS + 1];
- + static char *progsw = NULLCP;
- + static int rfc934sw = 1;
- + static int serialsw = 0;
- + static int showsw = 0;
- + static int sizesw = 1;
- + static int storesw = 0;
- + static int ntype = 0;
- + static char *types[NTYPES + 1];
- + int verbosw = 0;
- +
- + static int endian = 0;
- + static char *mm_charset = NULL;
- +
- + static int xpid = 0;
- + static int userrs = 0;
- +
- + static char *cache;
- + static int cwdlen;
- + static char *cwd;
- + static char *dir;
- + static char *errs = NULL;
- + static char *tmp;
- +
- +
- + extern int errno;
- + extern int sys_nerr;
- + extern char *sys_errlist[];
- +
- + off_t lseek ();
- + time_t time ();
- +
- + /* */
- +
- + #define LSTFMT1 "%4s %-5s %-24s %5s %-36s\n"
- +
- + #define LSTFMT2a "%4d "
- + #define LSTFMT2b "%-5s %-24.24s "
- + #define LSTFMT2c1 "%5lu"
- + #define LSTFMT2c2 "%4lu%c"
- + #define LSTFMT2c3 "huge "
- + #define LSTFMT2c4 " "
- + #define LSTFMT2d1 " %-36.36s"
- + #define LSTFMT2d2 "\t %-65.65s\n"
- +
- + static void build_comp ();
- +
- + typedef struct CTinfo {
- + char *ci_type;
- + char *ci_subtype;
- +
- + #define NPARMS 10
- + char *ci_attrs[NPARMS + 2];
- + char *ci_values[NPARMS];
- +
- + char *ci_comment;
- +
- + char *ci_magic;
- + } CTInfo, *CI;
- + #define NULLCI ((CI) 0)
- +
- + static int get_ctinfo ();
- + static int get_comment ();
- +
- +
- + typedef struct Content {
- + char *c_partno; /* within multipart content */
- +
- + char *c_vrsn; /* Body-Version: */
- +
- + char *c_ctline; /* Content-Type: */
- + CTInfo c_ctinfo;
- +
- + int c_type; /* internal form */
- + #define CT_UNKNOWN 0x00
- + #define CT_APPLICATION 0x01
- + #define CT_AUDIO 0x02
- + #define CT_IMAGE 0x03
- + #define CT_MESSAGE 0x04
- + #define CT_MULTIPART 0x05
- + #define CT_TEXT 0x06
- + #define CT_VIDEO 0x07
- + #define CT_EXTENSION 0x08
- +
- + int c_subtype; /* filled-in by c_ctinitfnx */
- + caddr_t c_ctparams; /* .. */
- + caddr_t c_ctextern; /* .. */
- + char *c_showproc; /* default, if not in profile */
- + char *c_termproc; /* for charset madness... */
- + char *c_storeproc; /* default, if not in profile */
- +
- + int (*c_ctinitfnx) (); /* parse content */
- + int (*c_ctlistfnx) (); /* list content */
- + int (*c_ctshowfnx) (); /* show content */
- + int (*c_ctstorefnx) (); /* store content */
- + int (*c_ctfreefnx) (); /* free content-specific structures */
- +
- +
- + char *c_celine; /* Content-Transfer-Encoding: */
- +
- + int c_encoding; /* internal form */
- + #define CE_UNKNOWN 0x00
- + #define CE_BASE64 0x01
- + #define CE_QUOTED 0x02
- + #define CE_8BIT 0x03
- + #define CE_7BIT 0x04
- + #define CE_BINARY 0x05
- + #define CE_EXTENSION 0x06
- + #define CE_EXTERNAL 0x07 /* for external-body */
- +
- + caddr_t c_ceparams; /* filled-in by encoding initfnx */
- +
- + int (*c_ceopenfnx) (); /* get a stream to decoded contents */
- + int (*c_ceclosefnx) (); /* release stream */
- + int (*c_celistfnx) (); /* list decoding info */
- + unsigned long
- + (*c_cesizefnx) (); /* size of decoded contents */
- + int (*c_cefreefnx) (); /* free encoding-specific structures */
- +
- +
- + char *c_id; /* Content-ID: */
- + char *c_descr; /* Content-Description: */
- +
- +
- + FILE *c_fp; /* read contents (stream) */
- + char *c_file; /* read contents (file) */
- + int c_unlink; /* remove file when done? */
- + int c_umask; /* associated umask */
- + long c_begin; /* where content starts in file */
- + long c_end; /* .. ends */
- +
- + int c_pid; /* process doing display */
- + char *c_storage; /* write contents (file) */
- +
- + int c_rfc934; /* rfc934 compatibility */
- + } Content, *CT;
- + #define NULLCT ((CT) 0)
- +
- + static CT get_content ();
- + static int list_content (), show_content (), store_content ();
- + static int user_content(), compose_content(), output_content();
- + static void free_content (), flush_errors ();
- +
- + #if defined(__STDC__) && defined(VSPRINTF)
- + static void content_error (char *, register CT, char *, ...);
- + #else
- + static void content_error ();
- + #endif
- +
- + static int init_encoding(), type_ok(), copy_some_headers(), set_endian();
- + static int write7Bit(), writeQuoted(), writeBase64(), writeBase64aux();
- + static int via_mail(), via_post(), pidcheck();
- +
- + static CT *cts = NULL;
- +
- +
- + #define quitser pipeser
- + static TYPESIG pipeser ();
- + static char *fgetstr ();
- +
- + /* */
- +
- + /* ARGSUSED */
- +
- + main (argc, argv)
- + int argc;
- + char **argv;
- + {
- + int f6 = 0,
- + msgp = 0,
- + msgnum;
- + char *cp,
- + *f1 = NULL,
- + *f2 = NULL,
- + *f3 = NULL,
- + *f4 = NULL,
- + *f5 = NULL,
- + *f7 = NULL,
- + *file = NULL,
- + *folder = NULL,
- + *maildir,
- + buf[100],
- + **ap,
- + **argp,
- + *arguments[MAXARGS],
- + *msgs[MAXARGS];
- + struct msgs *mp;
- + register CT ct,
- + *ctp;
- + FILE *fp;
- +
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- + invo_name = r1bindex (argv[0], '/');
- + if (argv[1] && uprf (argv[1], "-via"))
- + m_foil (NULLCP);
- + if ((cp = m_find (invo_name)) != NULL) {
- + ap = brkstring (cp = getcpy (cp), " ", "\n");
- + ap = copyip (ap, arguments);
- + }
- + else
- + ap = arguments;
- + (void) copyip (argv + 1, ap);
- + argp = arguments;
- +
- + /* */
- +
- + while (cp = *argp++) {
- + if (*cp == '-')
- + switch (smatch (++cp, switches)) {
- + case AMBIGSW:
- + ambigsw (cp, switches);
- + done (1);
- + case UNKWNSW:
- + adios (NULLCP, "-%s unknown", cp);
- + case HELPSW:
- + (void) sprintf (buf, "%s [+folder] [msgs] [switches]",
- + invo_name);
- + help (buf, switches);
- + done (1);
- +
- + case AUTOSW:
- + autosw++;
- + continue;
- + case NAUTOSW:
- + autosw = 0;
- + continue;
- +
- + case DEBUGSW:
- + debugsw++;
- + continue;
- +
- + case EBCDICSW:
- + ebcdicsw++;
- + continue;
- + case NEBCDICSW:
- + ebcdicsw = 0;
- + continue;
- +
- + case FORMSW:
- + if (!(cp = *argp++) || *cp == '-')
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + if (formsw)
- + free (formsw);
- + formsw = getcpy (libpath (cp));
- + continue;
- +
- + case HEADSW:
- + headsw++;
- + continue;
- + case NHEADSW:
- + headsw = 0;
- + continue;
- +
- + case LISTSW:
- + listsw++;
- + continue;
- + case NLISTSW:
- + listsw = 0;
- + continue;
- +
- + case PARTSW:
- + if (!(cp = *argp++) || *cp == '-')
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + if (npart >= NPARTS)
- + adios (NULLCP,
- + "too many parts (starting with %s), %d max",
- + cp, NPARTS);
- + parts[npart++] = cp;
- + continue;
- +
- + case RFC934SW:
- + rfc934sw++;
- + continue;
- + case NRFC934SW:
- + rfc934sw = 0;
- + continue;
- +
- + case SERIALSW:
- + serialsw++;
- + continue;
- + case NSERIALSW:
- + serialsw = 0;
- + continue;
- +
- + case SHOWSW:
- + showsw++;
- + continue;
- + case NSHOWSW:
- + showsw = 0;
- + continue;
- +
- + case SIZESW:
- + sizesw++;
- + continue;
- + case NSIZESW:
- + sizesw = 0;
- + continue;
- +
- + case STORESW:
- + storesw++;
- + continue;
- + case NSTORESW:
- + storesw = 0;
- + continue;
- +
- + case TYPESW:
- + if (!(cp = *argp++) || *cp == '-')
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + if (ntype >= NTYPES)
- + adios (NULLCP,
- + "too many types (starting with %s), %d max",
- + cp, NTYPES);
- + types[ntype++] = cp;
- + continue;
- +
- + case VERBSW:
- + verbosw++;
- + continue;
- + case NVERBSW:
- + verbosw = 0;
- + continue;
- +
- + case PROGSW:
- + if (!(progsw = *argp++) || *progsw == '-')
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + continue;
- + case NPROGSW:
- + nomore++;
- + continue;
- +
- + case LENSW:
- + case WIDSW:
- + if (!(cp = *argp++) || *cp == '-')
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + continue;
- +
- + case FILESW:
- + if (!(cp = *argp++) || (*cp == '-' && cp[1]))
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + file = *cp == '-' ? cp : path (cp, TFILE);
- + continue;
- +
- + case VIAMSW:
- + if (!(f1 = *argp++))
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + continue;
- + case VIASSW:
- + if (!(f2 = *argp++))
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + continue;
- + case VIAPSW:
- + if (!(f3 = *argp++))
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + continue;
- + case VIADSW:
- + if (!(f4 = *argp++))
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + continue;
- + case VIACSW:
- + if (!(f5 = *argp++))
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + continue;
- + case VIAZSW:
- + if (!(cp = *argp++) || *cp == '-')
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + if (sscanf (cp, "%d", &f6) != 1 || f6 < 0)
- + f6 = 300;
- + continue;
- + case VIAFSW:
- + if (!(f7 = *argp++))
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + continue;
- + }
- + if (*cp == '+' || *cp == '@') {
- + if (folder)
- + adios (NULLCP, "only one folder at a time!");
- + else
- + folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
- + }
- + else
- + msgs[msgp++] = cp;
- + }
- + parts[npart] = NULL, types[ntype] = NULL;
- + if (!formsw)
- + formsw = getcpy (libpath ("mhl.headers"));
- +
- + set_endian ();
- +
- + /* */
- +
- + if (f1) {
- + via_mail (f1, f2, f3, f4, f5, f6, f7);
- + /* NOTREACHED */
- + }
- + else
- + if (f2 || f3 || f4 || f5 || f6)
- + adios (NULLCP, "missing -viamail \"mailpath\" switch");
- +
- + if (cp = getenv ("MHN")) {
- + if (fp = fopen (cp, "r")) {
- + m_readefs ((struct node **) 0, fp, cp, 0);
- +
- + (void) fclose (fp);
- + }
- + else
- + admonish ("", "unable to read $MHN profile (%s)", cp);
- + }
- + if (fp = fopen (cp = libpath ("mhn_defaults"), "r")) {
- + m_readefs ((struct node **) 0, fp, cp, 0);
- +
- + (void) fclose (fp);
- + }
- +
- + (void) sprintf (buf, "%s-cache", invo_name);
- + cache = m_find (buf);
- +
- + cwdlen = strlen (cwd = getcpy (pwd ()));
- + (void) sprintf (buf, "%s-storage", invo_name);
- + dir = getcpy ((cp = m_find (buf)) && *cp ? cp : cwd);
- + tmp = cp && *cp ? concat (cp, "/", invo_name, NULLCP)
- + : add (m_maildir (invo_name), NULLCP);
- +
- + if (!m_find ("path"))
- + free (path ("./", TFOLDER));
- +
- + if (msgp == 1
- + && !folder
- + && !npart
- + && !showsw
- + && !storesw
- + && !ntype
- + && !file
- + && (cp = getenv ("mhdraft"))
- + && strcmp (cp, msgs[0]) == 0) {
- + build_comp (cp);
- + /* NOTREACHED */
- + }
- +
- + if (file) {
- + int stdinP;
- +
- + if (msgp)
- + adios (NULLCP, "only one file at a time!");
- +
- + if ((cts = (CT *) calloc ((unsigned) 2, sizeof *cts)) == NULL)
- + adios (NULLCP, "out of memory");
- +
- + ctp = cts;
- + if (stdinP = (strcmp (file, "-") == 0)) {
- + char buffer[BUFSIZ];
- +
- + file = add (m_tmpfil (invo_name), NULLCP);
- +
- + if ((fp = fopen (file, "w+")) == NULL)
- + adios (file, "unable to fopen for writing and reading");
- + (void) chmod (file, 0600);
- + while (fgets (buffer, sizeof buffer, stdin))
- + (void) fputs (buffer, fp);
- + (void) fflush (fp);
- +
- + if (ferror (stdin)) {
- + (void) unlink (file);
- + adios ("stdin", "error reading");
- + }
- +
- + if (ferror (fp)) {
- + (void) unlink (file);
- + adios (file, "error writing");
- + }
- +
- + (void) fseek (fp, 0L, 0);
- + }
- + else
- + if ((fp = fopen (file, "r")) == NULL)
- + adios (file, "unable to read");
- +
- + if (ct = get_content (fp, file, 1)) {
- + if (stdinP)
- + ct -> c_unlink = 1;
- +
- + ct -> c_fp = NULL;
- + if (ct -> c_end == 0L) {
- + (void) fseek (fp, 0L, 2);
- + ct -> c_end = ftell (fp);
- + }
- + if (ct -> c_ctinitfnx && (*ct -> c_ctinitfnx) (ct) == NOTOK)
- + free_content (ct);
- + else
- + *ctp++ = ct;
- + }
- + else
- + advise (NULLCP, "unable to decode %s", file);
- +
- + (void) fclose (fp);
- +
- + mp = NULL;
- + goto go_to_it;
- + }
- +
- + if (!msgp)
- + msgs[msgp++] = "cur";
- + if (!folder)
- + folder = m_getfolder ();
- + maildir = m_maildir (folder);
- +
- + if (chdir (maildir) == NOTOK)
- + adios (maildir, "unable to change directory to");
- + if (!(mp = m_gmsg (folder)))
- + adios (NULLCP, "unable to read folder %s", folder);
- + if (mp -> hghmsg == 0)
- + adios (NULLCP, "no messages in %s", folder);
- +
- + for (msgnum = 0; msgnum < msgp; msgnum++)
- + if (!m_convert (mp, msgs[msgnum]))
- + done (1);
- + m_setseq (mp);
- +
- + if ((cts = (CT *) calloc ((unsigned) (mp -> numsel + 1), sizeof *cts))
- + == NULL)
- + adios (NULLCP, "out of memory");
- +
- + ctp = cts;
- + for (msgnum = mp -> lowsel; msgnum <= mp -> hghsel; msgnum++)
- + if (mp -> msgstats[msgnum] & SELECTED) {
- + char *msgnam;
- +
- + if ((fp = fopen (msgnam = m_name (msgnum), "r")) == NULL)
- + adios (msgnam, "unable to read message");
- +
- + if (ct = get_content (fp, msgnam, 1)) {
- + ct -> c_fp = NULL;
- + if (ct -> c_end == 0L) {
- + (void) fseek (fp, 0L, 2);
- + ct -> c_end = ftell (fp);
- + }
- + if (ct -> c_ctinitfnx && (*ct -> c_ctinitfnx) (ct) == NOTOK)
- + free_content (ct);
- + else
- + *ctp++ = ct;
- + }
- + else
- + advise (NULLCP, "unable to decode message %s", msgnam);
- +
- + (void) fclose (fp);
- + }
- +
- + go_to_it: ;
- + if (!*cts)
- + done (1);
- +
- + if (!listsw && !showsw && !storesw)
- + showsw++;
- +
- + /* listsw && showsw -> user wants per-message listing,
- + so delay until showsw processing
- +
- + && storesw && sizesw -> evaluating size will cause more work,
- + so delay until after storesw processing
- + */
- + userrs = 1;
- + (void) signal (SIGQUIT, quitser);
- + (void) signal (SIGPIPE, pipeser);
- +
- + for (ctp = cts; ct = *ctp; ctp++)
- + if (type_ok (ct)
- + && (ct -> c_ctlistfnx
- + || ct -> c_ctstorefnx
- + || ct -> c_ctshowfnx)) {
- + struct stat st;
- +
- + if (!ct -> c_umask)
- + ct -> c_umask = ~(stat (ct -> c_file, &st) != NOTOK
- + ? (st.st_mode & 0777) : m_gmprot ());
- + }
- +
- + if (listsw && !showsw && (!storesw || !sizesw)) {
- + if (headsw)
- + printf (LSTFMT1, "msg", "part", "type/subtype", "size",
- + "description");
- +
- + for (ctp = cts; ct = *ctp; ctp++)
- + if (type_ok (ct) && ct -> c_ctlistfnx) {
- + (void) umask (ct -> c_umask);
- + (void) (*ct -> c_ctlistfnx) (ct, 1);
- + if (ct -> c_fp)
- + (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
- + }
- +
- + flush_errors ();
- + }
- +
- + if (storesw) {
- + for (ctp = cts; ct = *ctp; ctp++)
- + if (type_ok (ct) && ct -> c_ctstorefnx) {
- + (void) umask (ct -> c_umask);
- + (void) (*ct -> c_ctstorefnx) (ct, NULLCP);
- + if (ct -> c_fp)
- + (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
- + }
- +
- + flush_errors ();
- + }
- +
- + if (listsw && !showsw && storesw && sizesw) {
- + if (headsw)
- + printf (LSTFMT1, "msg", "part", "type/subtype", "size",
- + "description");
- +
- + for (ctp = cts; ct = *ctp; ctp++)
- + if (type_ok (ct) && ct -> c_ctlistfnx) {
- + (void) umask (ct -> c_umask);
- + (void) (*ct -> c_ctlistfnx) (ct, 1);
- + if (ct -> c_fp)
- + (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
- + }
- +
- + flush_errors ();
- + listsw = 0;
- + }
- +
- + if (showsw)
- + for (ctp = cts; ct = *ctp; ctp++) {
- + int child_id,
- + i,
- + vecp;
- + char *vec[8];
- + #if defined(BSD42) && !defined(WAITINT)
- + union wait status;
- + #else
- + int status;
- + #endif
- + TYPESIG (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
- +
- + if (!type_ok (ct))
- + continue;
- +
- + (void) umask (ct -> c_umask);
- +
- + if (listsw) {
- + if (headsw)
- + printf (LSTFMT1, "msg", "part", "type/subtype", "size",
- + "description");
- +
- + if (ct -> c_ctlistfnx)
- + (void) (*ct -> c_ctlistfnx) (ct, 1);
- + }
- +
- + if (!ct -> c_ctshowfnx) {
- + if (ct -> c_fp)
- + (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
- + continue;
- + }
- +
- + vecp = 0;
- + vec[vecp++] = r1bindex (mhlproc, '/');
- + vec[vecp++] = "-form";
- + vec[vecp++] = formsw;
- + vec[vecp++] = "-nobody";
- + vec[vecp++] = ct -> c_file;
- + if (nomore)
- + vec[vecp++] = "-nomoreproc";
- + else
- + if (progsw) {
- + vec[vecp++] = "-moreproc";
- + vec[vecp++] = progsw;
- + }
- + vec[vecp] = NULL;
- +
- + (void) fflush (stdout);
- +
- + for (i = 0; (child_id = vfork ()) == NOTOK && i < 5; i++)
- + sleep (5);
- + switch (child_id) {
- + case NOTOK:
- + adios ("fork", "unable to");
- + /* NOTREACHED */
- +
- + case OK:
- + (void) execvp (mhlproc, vec);
- + fprintf (stderr, "unable to exec ");
- + perror (mhlproc);
- + _exit (-1);
- + /* NOTREACHED */
- +
- + default:
- + xpid = child_id;
- + break;
- + }
- +
- + (void) (*ct -> c_ctshowfnx) (ct, 1, 0);
- + if (ct -> c_fp)
- + (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
- +
- + hstat = signal (SIGHUP, SIG_IGN);
- + istat = signal (SIGINT, SIG_IGN);
- + qstat = signal (SIGQUIT, SIG_IGN);
- + tstat = signal (SIGTERM, SIG_IGN);
- +
- + while (wait (&status) != NOTOK) {
- + #if defined(BSD42) && !defined(WAITINT)
- + (void) pidcheck (status.w_status);
- + #else
- + (void) pidcheck (status);
- + #endif
- + continue;
- + }
- +
- + (void) signal (SIGHUP, hstat);
- + (void) signal (SIGINT, istat);
- + (void) signal (SIGQUIT, qstat);
- + (void) signal (SIGTERM, tstat);
- +
- + xpid = 0;
- +
- + flush_errors ();
- + }
- +
- + for (ctp = cts; *ctp; ctp++)
- + free_content (*ctp);
- + free ((char *) cts);
- + cts = NULL;
- +
- + if (mp) {
- + m_replace (pfolder, folder);
- + if (mp -> hghsel != mp -> curmsg)
- + m_setcur (mp, mp -> hghsel);
- + m_sync (mp);
- + m_update ();
- + }
- +
- + done (0);
- + /* NOTREACHED */
- + }
- +
- + /* */
- +
- + static TYPESIG pipeser (i)
- + int i;
- + {
- + if (i == SIGQUIT) {
- + (void) unlink ("core");
- +
- + (void) fflush (stdout);
- +
- + fprintf (stderr, "\n");
- + (void) fflush (stderr);
- + }
- +
- + done (1);
- + /* NOTREACHED */
- + }
- +
- + /* */
- +
- + #include "../h/mhn.h"
- +
- +
- + struct str2init {
- + char *si_key;
- + int si_value;
- + int (*si_init) ();
- + };
- +
- +
- + static int InitApplication (), InitMessage (), InitMultiPart (), InitText ();
- +
- +
- + static struct str2init str2cts[] = {
- + "application", CT_APPLICATION, InitApplication,
- + "audio", CT_AUDIO, NULL,
- + "image", CT_IMAGE, NULL,
- + "message", CT_MESSAGE, InitMessage,
- + "multipart", CT_MULTIPART, InitMultiPart,
- + "text", CT_TEXT, InitText,
- + "video", CT_VIDEO, NULL,
- +
- + NULL, CT_EXTENSION, NULL, /* these two must be last! */
- + NULL, CT_UNKNOWN, NULL,
- + };
- +
- +
- + static int InitBase64 (), InitQuoted (), Init7Bit ();
- +
- + static struct str2init str2ces[] = {
- + "base64", CE_BASE64, InitBase64,
- + "quoted-printable", CE_QUOTED, InitQuoted,
- + "8bit", CE_8BIT, Init7Bit,
- + "7bit", CE_7BIT, Init7Bit,
- + "binary", CE_BINARY, NULL,
- +
- + NULL, CE_EXTENSION, NULL, /* these two must be last! */
- + NULL, CE_UNKNOWN, NULL,
- + };
- +
- + /* */
- +
- + static CT get_content (in, file, toplevel)
- + FILE *in;
- + char *file;
- + int toplevel;
- + {
- + int compnum,
- + state;
- + char buf[BUFSIZ],
- + name[NAMESZ];
- + register CT ct;
- +
- + if ((ct = (CT) calloc (1, sizeof *ct)) == NULL)
- + adios (NULLCP, "out of memory");
- +
- + ct -> c_begin = ftell (ct -> c_fp = in) + 1;
- + ct -> c_file = add (file, NULLCP);
- + for (compnum = 1, state = FLD;;) {
- + switch (state = m_getfld (state, name, buf, sizeof buf, in)) {
- + case FLD:
- + case FLDPLUS:
- + case FLDEOF:
- + compnum++;
- +
- + if (uleq (name, VRSN_FIELD)) {
- + register char *cp;
- +
- + cp = add (buf, NULLCP);
- + while (state == FLDPLUS) {
- + state = m_getfld (state, name, buf, sizeof buf, in);
- + cp = add (buf, cp);
- + }
- +
- + if (ct -> c_vrsn) {
- + char *dp = trimcpy (cp);
- +
- + advise (NULLCP,
- + "message %s has multiple %s: fields (%s)",
- + ct -> c_file, VRSN_FIELD, dp);
- + free (dp);
- + free (cp);
- + goto out;
- + }
- +
- + ct -> c_vrsn = cp;
- + #ifdef whocares
- + while (isspace (*cp))
- + cp++;
- + for (dp = cp; istoken (*dp); dp++)
- + continue;
- + c = *dp, *dp = NULL;
- + if (!uleq (cp, VRSN_VALUE)) {
- + if (!isspace (c))
- + *dp = c;
- + advise (NULLCP,
- + "message %s has unsupported value for %s: field (%s)",
- + ct -> c_file, VRSN_FIELD, cp);
- + goto out;
- + }
- + *dp = c;
- + #endif
- + goto got_header;
- + }
- +
- + if (uleq (name, TYPE_FIELD)) {
- + register char *cp;
- + register struct str2init *s2i;
- + register CI ci = &ct -> c_ctinfo;
- +
- + cp = add (buf, NULLCP);
- + while (state == FLDPLUS) {
- + state = m_getfld (state, name, buf, sizeof buf, in);
- + cp = add (buf, cp);
- + }
- +
- + if (ct -> c_ctline) {
- + char *dp = trimcpy (cp);
- +
- + advise (NULLCP,
- + "message %s has multiple %s: fields (%s)",
- + ct -> c_file, TYPE_FIELD, dp);
- + free (dp);
- + free (cp);
- + goto out;
- + }
- +
- + if (get_ctinfo (cp, ct, 0) == NOTOK)
- + goto out;
- + for (s2i = str2cts; s2i -> si_key; s2i++)
- + if (uleq (ci -> ci_type, s2i -> si_key))
- + break;
- + if (!s2i -> si_key && !uprf (ci -> ci_type, "X-"))
- + s2i++;
- + ct -> c_type = s2i -> si_value;
- + ct -> c_ctinitfnx = s2i -> si_init;
- + goto got_header;
- + }
- +
- + if (uleq (name, ENCODING_FIELD)) {
- + register char *cp,
- + *dp;
- + char c;
- + register struct str2init *s2i;
- +
- + cp = add (buf, NULLCP);
- + while (state == FLDPLUS) {
- + state = m_getfld (state, name, buf, sizeof buf, in);
- + cp = add (buf, cp);
- + }
- +
- + if (ct -> c_celine) {
- + advise (NULLCP,
- + "message %s has multiple %s: fields (%s)",
- + ct -> c_file, ENCODING_FIELD,
- + dp = trimcpy (cp));
- + free (dp);
- + free (cp);
- + goto out;
- + }
- +
- + ct -> c_celine = cp;
- + while (isspace (*cp))
- + cp++;
- + for (dp = cp; istoken (*dp); dp++)
- + continue;
- + c = *dp, *dp = '\0';
- + for (s2i = str2ces; s2i -> si_key; s2i++)
- + if (uleq (cp, s2i -> si_key))
- + break;
- + if (!s2i -> si_key && !uprf (cp, "X-"))
- + s2i++;
- + *dp = c;
- + ct -> c_encoding = s2i -> si_value;
- + if (s2i -> si_init && (*s2i -> si_init) (ct) == NOTOK)
- + goto out;
- + goto got_header;
- + }
- +
- + if (uleq (name, ID_FIELD)) {
- + ct -> c_id = add (buf, ct -> c_id);
- + while (state == FLDPLUS) {
- + state = m_getfld (state, name, buf, sizeof buf, in);
- + ct -> c_id = add (buf, ct -> c_id);
- + }
- + goto got_header;
- + }
- +
- + if (uleq (name, DESCR_FIELD)) {
- + ct -> c_descr = add (buf, ct -> c_descr);
- + while (state == FLDPLUS) {
- + state = m_getfld (state, name, buf, sizeof buf, in);
- + ct -> c_descr = add (buf, ct -> c_descr);
- + }
- + goto got_header;
- + }
- +
- + #ifdef notdef
- + if (uprf (name, XXX_FIELD_PRF))
- + advise (NULLCP, "unknown field (%s) in message %s",
- + name, ct -> c_file);
- + /* and fall... */
- + #endif
- +
- + while (state == FLDPLUS)
- + state = m_getfld (state, name, buf, sizeof buf, in);
- + got_header: ;
- + if (state != FLDEOF) {
- + ct -> c_begin = ftell (in) + 1;
- + continue;
- + }
- + /* else fall... */
- +
- + case BODY:
- + case BODYEOF:
- + break;
- +
- + case FILEEOF:
- + ct -> c_begin = ftell (in);
- + break;
- +
- + case LENERR:
- + case FMTERR:
- + adios (NULLCP, "message format error in component #%d",
- + compnum);
- +
- + default:
- + adios (NULLCP, "getfld() returned %d", state);
- + }
- + break;
- + }
- +
- + if (!ct -> c_ctline) {
- + if (toplevel < 0) {
- + if (get_ctinfo ("message/rfc822", ct, 0) == NOTOK)
- + goto out;
- + ct -> c_type = CT_MESSAGE;
- + ct -> c_ctinitfnx = InitMessage;
- + }
- + else {
- + if (get_ctinfo ("text/plain", ct, 0) == NOTOK)
- + goto out;
- + ct -> c_type = CT_TEXT;
- + ct -> c_ctinitfnx = InitText;
- + }
- + }
- + if (!ct -> c_ctlistfnx)
- + ct -> c_ctlistfnx = list_content;
- + if (!ct -> c_ctshowfnx)
- + ct -> c_ctshowfnx = show_content;
- + if (!ct -> c_ctstorefnx)
- + ct -> c_ctstorefnx = store_content;
- +
- + if (!ct -> c_celine) {
- + ct -> c_encoding = CE_7BIT;
- + (void) Init7Bit (ct);
- + }
- +
- + return ct;
- +
- + out:
- + free_content (ct);
- + return NULLCT;
- + }
- +
- + /* */
- +
- + static int get_ctinfo (cp, ct, magic)
- + char *cp;
- + register CT ct;
- + int magic;
- + {
- + int i = strlen (invo_name) + 2;
- + register char *dp,
- + **ap,
- + **ep;
- + char c;
- + register CI ci = &ct -> c_ctinfo;
- +
- + cp = ct -> c_ctline = add (cp, NULLCP);
- + while (isspace (*cp))
- + cp++;
- + for (dp = index (cp, '\n'); dp; dp = index (dp, '\n'))
- + *dp++ = ' ';
- + for (dp = cp + strlen (cp) - 1; dp >= cp; dp--)
- + if (!isspace (*dp))
- + break;
- + *++dp = '\0';
- + if (debugsw)
- + fprintf (stderr, "%s: %s\n", TYPE_FIELD, cp);
- +
- + if (*cp == '(' && get_comment (ct, &cp) == NOTOK)
- + return NOTOK;
- +
- + for (dp = cp; istoken (*dp); dp++)
- + continue;
- + c = *dp, *dp = '\0';
- + ci -> ci_type = add (cp, NULLCP);
- + *dp = c, cp = dp;
- +
- + if (!*ci -> ci_type) {
- + advise (NULLCP, "invalid %s: field in message %s (empty type)",
- + TYPE_FIELD, ct -> c_file);
- + return NOTOK;
- + }
- +
- + for (dp = ci -> ci_type; *dp; dp++)
- + if (isalpha(*dp) && isupper (*dp))
- + *dp = tolower (*dp);
- +
- + while (isspace (*cp))
- + cp++;
- +
- + if (*cp == '(' && get_comment (ct, &cp) == NOTOK)
- + return NOTOK;
- +
- + if (*cp != '/') {
- + if (!magic)
- + ci -> ci_subtype = add ("", NULLCP);
- + goto magic_skip;
- + }
- +
- + cp++;
- + while (isspace (*cp))
- + cp++;
- +
- + if (*cp == '(' && get_comment (ct, &cp) == NOTOK)
- + return NOTOK;
- +
- + for (dp = cp; istoken (*dp); dp++)
- + continue;
- + c = *dp, *dp = '\0';
- + ci -> ci_subtype = add (cp, NULLCP);
- + *dp = c, cp = dp;
- +
- + if (!*ci -> ci_subtype) {
- + advise (NULLCP,
- + "invalid %s: field in message %s (empty subtype for \"%s\")",
- + TYPE_FIELD, ct -> c_file, ci -> ci_type);
- + return NOTOK;
- + }
- +
- + for (dp = ci -> ci_subtype; *dp; dp++)
- + if (isalpha(*dp) && isupper (*dp))
- + *dp = tolower (*dp);
- +
- + magic_skip: ;
- + while (isspace (*cp))
- + cp++;
- +
- + if (*cp == '(' && get_comment (ct, &cp) == NOTOK)
- + return NOTOK;
- +
- + ep = (ap = ci -> ci_attrs) + NPARMS;
- + while (*cp == ';') {
- + char *vp,
- + *up;
- +
- + if (ap >= ep) {
- + advise (NULLCP,
- + "too many parameters in message %s's %s: field (%d max)",
- + ct -> c_file, TYPE_FIELD, NPARMS);
- + return NOTOK;
- + }
- +
- + cp++;
- + while (isspace (*cp))
- + cp++;
- +
- + if (*cp == '(' && get_comment (ct, &cp) == NOTOK)
- + return NOTOK;
- +
- + if (*cp == 0) {
- + advise (NULLCP,
- + "extraneous trailing ';' in message %s's %s: parameter list",
- + ct -> c_file, TYPE_FIELD);
- + return OK;
- + }
- +
- + for (dp = cp; istoken (*dp); dp++)
- + if (isalpha(*dp) && isupper (*dp))
- + *dp = tolower (*dp);
- + for (up = dp; isspace (*dp); )
- + dp++;
- + if (dp == cp || *dp != '=') {
- + advise (NULLCP,
- + "invalid parameter in message %s's %s: field\n%*.*sparameter %s (error detected at offset %d)",
- + ct -> c_file, TYPE_FIELD, i, i, "", cp, dp - cp);
- + return NOTOK;
- + }
- +
- + vp = (*ap = add (cp, NULLCP)) + (up - cp);
- + *vp = '\0';
- + for (dp++; isspace (*dp); )
- + dp++;
- + ci -> ci_values[ap - ci -> ci_attrs] = vp = *ap + (dp - cp);
- + if (*dp == '"') {
- + for (cp = ++dp, dp = vp;;) {
- + switch (c = *cp++) {
- + case '\0':
- + bad_quote: ;
- + advise (NULLCP,
- + "invalid quoted-string in message %s's %s: field\n%*.*s(parameter %s)",
- + ct -> c_file, TYPE_FIELD, i, i, "", *ap);
- + return NOTOK;
- +
- + case '\\':
- + *dp++ = c;
- + if ((c = *cp++) == '\0')
- + goto bad_quote;
- + /* else fall... */
- +
- + default:
- + *dp++ = c;
- + continue;
- +
- + case '"':
- + *dp = '\0';
- + break;
- + }
- + break;
- + }
- + }
- + else {
- + for (cp = dp, dp = vp; istoken (*cp); cp++, dp++)
- + continue;
- + *dp = '\0';
- + }
- + if (!*vp) {
- + advise (NULLCP,
- + "invalid parameter in message %s's %s: field\n%*.*s(parameter %s)",
- + ct -> c_file, TYPE_FIELD, i, i, "", *ap);
- + return NOTOK;
- + }
- + ap++;
- +
- + while (isspace (*cp))
- + cp++;
- +
- + if (*cp == '(' && get_comment (ct, &cp) == NOTOK)
- + return NOTOK;
- + }
- +
- + if (magic && *cp == '[') {
- + ct -> c_descr = ++cp;
- + for (dp = cp + strlen (cp) - 1; dp >= cp; dp--)
- + if (*dp == ']')
- + break;
- + if (dp < cp) {
- + advise (NULLCP, "invalid description in message %s", ct -> c_file);
- + ct -> c_descr = NULL;
- + return NOTOK;
- + }
- +
- + c = *dp, *dp = '\0';
- + if (*ct -> c_descr)
- + ct -> c_descr = concat (ct -> c_descr, "\n", NULLCP);
- + else
- + ct -> c_descr = NULL;
- + *dp++ = c, cp = dp;
- +
- + while (isspace (*cp))
- + cp++;
- + }
- +
- + if (*cp) {
- + if (magic)
- + ci -> ci_magic = add (cp, NULLCP);
- + else
- + advise (NULLCP,
- + "extraneous information in message %s's %s: field\n%*.*s(%s)",
- + ct -> c_file, TYPE_FIELD, i, i, "", cp);
- + }
- +
- + return OK;
- + }
- +
- + /* */
- +
- + static int get_comment (ct, ap)
- + CT ct;
- + char **ap;
- + {
- + register int i;
- + register char *bp,
- + *cp;
- + char c,
- + buffer[BUFSIZ],
- + *dp;
- + register CI ci = &ct -> c_ctinfo;
- +
- + cp = *ap;
- +
- + bp = buffer;
- + cp++;
- + for (i = 0;;) {
- + switch (c = *cp++) {
- + case '\0':
- + invalid: ;
- + advise (NULLCP, "invalid comment in message %s's %s: field",
- + ct -> c_file, TYPE_FIELD);
- + return NOTOK;
- +
- + case '\\':
- + *bp++ = c;
- + if ((c = *cp++) == '\0')
- + goto invalid;
- + *bp++ = c;
- + continue;
- +
- + case '(':
- + i++;
- + /* and fall... */
- + default:
- + *bp++ = c;
- + continue;
- +
- + case ')':
- + if (--i < 0)
- + break;
- + *bp++ = c;
- + continue;
- + }
- + break;
- + }
- + *bp = '\0';
- +
- + if (dp = ci -> ci_comment) {
- + ci -> ci_comment = concat (dp, " ", buffer, NULLCP);
- + free (dp);
- + }
- + else
- + ci -> ci_comment = add (buffer, NULLCP);
- +
- + while (isspace (*cp))
- + cp++;
- +
- + *ap = cp;
- +
- + return OK;
- + }
- +
- + /* */
- +
- + #define empty(s) ((s) ? (s) : "")
- +
- +
- + static int list_content (ct, toplevel)
- + register CT ct;
- + int toplevel;
- + {
- + unsigned long size;
- + register char **ap,
- + **ep;
- + char *cp,
- + buffer[BUFSIZ];
- + register CI ci = &ct -> c_ctinfo;
- +
- + printf (toplevel > 0 ? LSTFMT2a : toplevel < 0 ? "part " : " ",
- + atoi (r1bindex (empty (ct -> c_file), '/')));
- + (void) sprintf (buffer, "%s/%s", empty (ci -> ci_type),
- + empty (ci -> ci_subtype));
- + printf (LSTFMT2b, empty (ct -> c_partno), buffer);
- +
- + size = ct -> c_cesizefnx && sizesw ? (*ct -> c_cesizefnx) (ct)
- + : ct -> c_end - ct -> c_begin;
- +
- + for (cp = " KMGT"; size > 9999; size >>= 10)
- + if (!*++cp)
- + break;
- + switch (*cp) {
- + case ' ':
- + if (size > 0 || ct -> c_encoding != CE_EXTERNAL)
- + printf (LSTFMT2c1, size);
- + else
- + printf (LSTFMT2c4);
- + break;
- +
- + default:
- + printf (LSTFMT2c2, size, *cp);
- + break;
- +
- + case '\0':
- + printf (LSTFMT2c3);
- + }
- +
- + if (ct -> c_descr) {
- + char *dp;
- +
- + dp = trimcpy (cp = add (ct -> c_descr, NULLCP));
- + free (cp);
- + printf (LSTFMT2d1, dp);
- + free (dp);
- + }
- +
- + printf ("\n");
- +
- + if (verbosw && ci -> ci_comment) {
- + char *dp;
- +
- + dp = trimcpy (cp = add (ci -> ci_comment, NULLCP));
- + free (cp);
- + (void) sprintf (buffer, "(%s)", dp);
- + free (dp);
- + printf (LSTFMT2d2, buffer);
- + }
- +
- + if (!debugsw)
- + return OK;
- +
- + (void) fflush (stdout);
- +
- + fprintf (stderr, " partno \"%s\"\n", empty (ct -> c_partno));
- +
- + if (ct -> c_vrsn)
- + fprintf (stderr, " %s:%s", VRSN_FIELD, ct -> c_vrsn);
- +
- + if (ct -> c_ctline)
- + fprintf (stderr, " %s:%s", TYPE_FIELD, ct -> c_ctline);
- + fprintf (stderr,
- + " type \"%s\" subtype \"%s\" comment \"%s\" magic \"%s\"\n",
- + empty (ci -> ci_type), empty (ci -> ci_subtype),
- + empty (ci -> ci_comment), empty (ci -> ci_magic));
- + for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++)
- + fprintf (stderr, " parameter %s=\"%s\"\n", *ap, *ep);
- + fprintf (stderr,
- + " type 0x%x subtype 0x%x params 0x%x\n",
- + ct -> c_type, ct -> c_subtype, ct -> c_ctparams);
- +
- + fprintf (stderr, " showproc \"%s\"\n", empty (ct -> c_showproc));
- + fprintf (stderr, " termproc \"%s\"\n", empty (ct -> c_termproc));
- + fprintf (stderr, " storeproc \"%s\"\n", empty (ct -> c_storeproc));
- +
- + if (ct -> c_celine)
- + fprintf (stderr, " %s:%s", ENCODING_FIELD, ct -> c_celine);
- + fprintf (stderr, " encoding 0x%x params 0x%x\n",
- + ct -> c_encoding, ct -> c_ceparams);
- +
- + if (ct -> c_id)
- + fprintf (stderr, " %s:%s", ID_FIELD, ct -> c_id);
- + if (ct -> c_descr)
- + fprintf (stderr, " %s:%s", DESCR_FIELD, ct -> c_descr);
- +
- + fprintf (stderr, " fp 0x%x file \"%s\" begin %d end %d\n",
- + ct -> c_fp, empty (ct -> c_file), ct -> c_begin, ct -> c_end);
- +
- + if (ct -> c_celistfnx)
- + (void) (*ct -> c_celistfnx) (ct);
- +
- + return OK;
- + }
- + #undef empty
- +
- + /* */
- +
- + #ifdef VSPRINTF
- + #ifdef __STDC__
- + #include <stdarg.h>
- + #else
- + #include <varargs.h>
- + #endif
- + #endif
- +
- + #ifdef VSPRINTF
- + #ifdef __STDC__
- + static void content_error (char *what, register CT ct, char *fmt, ...)
- + #else
- + static void content_error (va_alist)
- + va_dcl
- + #endif
- + #else /* !VSPRINTF */
- + /* VARARGS3 */
- + static void content_error (what, ct, fmt, a, b, c, d, e, f)
- + char *what,
- + *fmt,
- + *a,
- + *b,
- + *c,
- + *d,
- + *e,
- + *f;
- + register CT ct;
- + #endif
- + {
- + #ifdef VSPRINTF
- + va_list arglist;
- + #endif
- + #if defined(VSPRINTF) && !defined(__STDC__)
- + char *what, *fmt;
- + register CT ct;
- + #endif
- + int i;
- + register char *bp;
- + char buffer[BUFSIZ];
- + register CI ci;
- +
- + bp = buffer;
- +
- + if (userrs && invo_name && *invo_name) {
- + (void) sprintf (bp, "%s: ", invo_name);
- + bp += strlen (bp);
- + }
- +
- + #ifdef VSPRINTF
- + #ifdef __STDC__
- + va_start (arglist, fmt);
- + #else
- + va_start (arglist);
- + what = va_arg(arglist, char *);
- + ct = va_arg(arglist, CT);
- + fmt = va_arg(arglist, char *);
- + #endif
- + (void) vsprintf (bp, fmt, arglist);
- + bp += strlen (bp);
- + #else
- + (void) sprintf (bp, fmt, a, b, c, d, e, f);
- + bp += strlen (bp);
- + #endif
- + ci = &ct -> c_ctinfo;
- +
- + if (what) {
- + if (*what) {
- + (void) sprintf (bp, " %s: ", what);
- + bp += strlen (bp);
- + }
- +
- + if (errno > 0 && errno < sys_nerr)
- + (void) sprintf (bp, "%s", sys_errlist[errno]);
- + else
- + (void) sprintf (bp, "Error %d", errno);
- + bp += strlen (bp);
- + }
- +
- + i = strlen (invo_name) + 2;
- + (void) sprintf (bp, "\n%*.*s(content %s/%s", i, i, "", ci -> ci_type,
- + ci -> ci_subtype);
- + bp += strlen (bp);
- + if (ct -> c_file) {
- + (void) sprintf (bp, " in message %s", ct -> c_file);
- + bp += strlen (bp);
- + if (ct -> c_partno) {
- + (void) sprintf (bp, ", part %s", ct -> c_partno);
- + bp += strlen (bp);
- + }
- + }
- + (void) sprintf (bp, ")");
- + bp += strlen (bp);
- +
- + if (userrs) {
- + *bp++ = '\n';
- + *bp = '\0';
- +
- + errs = add (buffer, errs);
- + }
- + else
- + advise (NULLCP, "%s", buffer);
- + }
- +
- +
- + static void flush_errors ()
- + {
- + if (errs) {
- + (void) fflush (stdout);
- + fprintf (stderr, "%s", errs);
- + free (errs);
- + errs = NULL;
- + }
- + }
- +
- + /* */
- +
- + static jmp_buf intrenv;
- +
- +
- + /* ARGSUSED */
- +
- + static TYPESIG intrser (i)
- + int i;
- + {
- + #ifdef BSD42
- + (void) signal (SIGINT, intrser);
- + #endif
- +
- + (void) putchar ('\n');
- +
- + longjmp (intrenv, DONE);
- + }
- +
- + /* */
- +
- + static int show_content_aux ();
- +
- + static int show_content (ct, serial, alternate)
- + register CT ct;
- + int serial,
- + alternate;
- + {
- + register char *cp;
- + char buffer[BUFSIZ];
- + register CI ci = &ct -> c_ctinfo;
- +
- + (void) sprintf (buffer, "%s-show-%s/%s", invo_name, ci -> ci_type,
- + ci -> ci_subtype);
- + if ((cp = m_find (buffer)) == NULL || *cp == 0) {
- + (void) sprintf (buffer, "%s-show-%s", invo_name, ci -> ci_type);
- + if (((cp = m_find (buffer)) == NULL || *cp == 0)
- + && (cp = ct -> c_showproc) == NULL) {
- + if (!alternate)
- + content_error (NULLCP, ct,
- + "don't know how to display content");
- +
- + return NOTOK;
- + }
- + }
- +
- + return show_content_aux (ct, serial, alternate, cp, NULLCP);
- + }
- +
- +
- + static int show_content_aux (ct, serial, alternate, cp, cracked)
- + register CT ct;
- + int serial,
- + alternate;
- + register char *cp;
- + char *cracked;
- + {
- + int child_id,
- + fd,
- + i,
- + xlist,
- + xpause,
- + xstdin,
- + xtty;
- + register char *bp;
- + char *file,
- + *vec[4],
- + buffer[BUFSIZ],
- + exec[BUFSIZ + sizeof "exec "];
- + register CI ci = &ct -> c_ctinfo;
- +
- + if (!ct -> c_ceopenfnx) {
- + if (!alternate)
- + content_error (NULLCP, ct, "don't know how to decode content");
- +
- + return NOTOK;
- + }
- +
- + file = NULL;
- + if ((fd = (*ct -> c_ceopenfnx) (ct, &file)) == NOTOK)
- + return NOTOK;
- + if (ct -> c_showproc && strcmp (ct -> c_showproc, "true") == 0)
- + return (alternate ? DONE : OK);
- +
- + xlist = xpause = xstdin = xtty = 0;
- + if (cracked) {
- + (void) strcpy (buffer, cp);
- + goto got_command;
- + }
- + buffer[0] = '\0';
- + for (bp = buffer; *cp; cp++)
- + if (*cp == '%') {
- + switch (*++cp) {
- + case 'a': /* additional arguments */
- + {
- + register char **ap,
- + **ep;
- + char *s = "";
- +
- + for (ap = ci -> ci_attrs, ep = ci -> ci_values;
- + *ap;
- + ap++, ep++) {
- + (void) sprintf (bp, "%s%s=\"%s\"", s, *ap, *ep);
- + bp += strlen (bp);
- + s = " ";
- + }
- + }
- + break;
- +
- + case 'e': /* exclusive execution */
- + xtty = 1;
- + break;
- +
- + case 'F': /* %e, %f, and stdin is terminal not content */
- + xstdin = xtty = 1;
- + /* and fall... */
- + case 'f': /* filename */
- + (void) sprintf (bp, "%s", file);
- + break;
- +
- + case 'p': /* pause prior to displaying content */
- + xpause = 1;
- + /* and fall... */
- + case 'l': /* display listing prior to displaying
- + content */
- + xlist = 1;
- + break;
- +
- + case 's': /* subtype */
- + (void) strcpy (bp, ci -> ci_subtype);
- + break;
- +
- + case '%':
- + goto raw;
- +
- + default:
- + *bp++ = *--cp;
- + *bp = '\0';
- + continue;
- + }
- + bp += strlen (bp);
- + }
- + else {
- + raw: ;
- + *bp++ = *cp;
- + *bp = '\0';
- + }
- + if (ct -> c_termproc) {
- + char term[BUFSIZ];
- +
- + (void) strcpy (term, buffer);
- + (void) sprintf (buffer, ct -> c_termproc, term);
- + }
- + got_command: ;
- +
- + if (debugsw || cracked) {
- + (void) fflush (stdout);
- +
- + fprintf (stderr, "%s msg %s", cracked ? "storing" : "show",
- + ct -> c_file);
- + if (ct -> c_partno)
- + fprintf (stderr, " part %s", ct -> c_partno);
- + if (cracked)
- + fprintf (stderr, " using command (cd %s; %s)\n", cracked, buffer);
- + else
- + fprintf (stderr, " using command %s\n", buffer);
- + }
- +
- + if (xtty && xpid) {
- + (void) pidcheck (pidwait (xpid, NOTOK));
- + xpid = 0;
- + }
- +
- + if (xlist) {
- + char prompt[BUFSIZ];
- +
- + if (ct -> c_ctlistfnx) {
- + (*ct -> c_ctlistfnx) (ct, -1);
- +
- + if (xpause && SOprintf ("Press <return> to show content..."))
- + printf ("Press <return> to show content...");
- + }
- + else {
- + register char *pp;
- +
- + pp = prompt;
- + if (ct -> c_descr) {
- + (void) sprintf (pp, "%s (", ct -> c_descr);
- + pp += strlen (pp);
- + }
- +
- + (void) sprintf (pp, "content %s/%s", ci -> ci_type,
- + ci -> ci_subtype);
- + pp += strlen (pp);
- + if (ct -> c_file) {
- + (void) sprintf (pp, " in message %s", ct -> c_file);
- + pp += strlen (pp);
- + if (ct -> c_partno) {
- + (void) sprintf (pp, ", part %s", ct -> c_partno);
- + pp += strlen (pp);
- + }
- + }
- +
- + if (ct -> c_descr) {
- + (void) sprintf (pp, ")");
- + pp += strlen (pp);
- + }
- +
- + if (!xpause)
- + printf ("%s\n", prompt);
- + else
- + if (SOprintf ("Press <return> to show %s...", prompt))
- + printf ("Press <return> to show %s...", prompt);
- + }
- +
- + if (xpause) {
- + int intr;
- + TYPESIG (*istat) ();
- +
- + istat = signal (SIGINT, intrser);
- + if ((intr = setjmp (intrenv)) == OK) {
- + (void) fflush (stdout);
- + prompt[0] = 0;
- + (void) read (fileno (stdout), prompt, sizeof prompt);
- + }
- + (void) signal (SIGINT, istat);
- + if (intr != OK) {
- + (void) (*ct -> c_ceclosefnx) (ct);
- + return (alternate ? DONE : NOTOK);
- + }
- + }
- + }
- +
- + (void) sprintf (exec, "exec %s", buffer);
- +
- + vec[0] = "/bin/sh";
- + vec[1] = "-c";
- + vec[2] = exec;
- + vec[3] = NULL;
- +
- + (void) fflush (stdout);
- +
- + for (i = 0; (child_id = vfork ()) == NOTOK && i < 5; i++)
- + sleep (5);
- + switch (child_id) {
- + case NOTOK:
- + advise ("fork", "unable to");
- + (void) (*ct -> c_ceclosefnx) (ct);
- + return NOTOK;
- +
- + case OK:
- + if (cracked)
- + (void) chdir (cracked);
- + if (!xstdin)
- + (void) dup2 (fd, 0);
- + (void) close (fd);
- + (void) execvp ("/bin/sh", vec);
- + fprintf (stderr, "unable to exec ");
- + perror ("/bin/sh");
- + _exit (-1);
- + /* NOTREACHED */
- +
- + default:
- + if (!serial) {
- + ct -> c_pid = child_id;
- + if (xtty)
- + xpid = child_id;
- + }
- + else
- + (void) pidcheck (pidXwait (child_id, NULLCP));
- +
- + (void) (*ct -> c_ceclosefnx) (ct);
- + return (alternate ? DONE : OK);
- + }
- + }
- +
- + /* */
- +
- + static int store_content (ct, append)
- + register CT ct;
- + char *append;
- + {
- + int appending = append && *append;
- + long last,
- + pos;
- + register char *bp,
- + *cp;
- + char *file,
- + buffer[BUFSIZ];
- + register CI ci = &ct -> c_ctinfo;
- + FILE *fp;
- +
- + if (appending) {
- + (void) strcpy (buffer, append);
- + goto got_filename;
- + }
- +
- + if ((cp = ct -> c_storeproc) == NULL || *cp == 0) {
- + (void) sprintf (buffer, "%s-store-%s/%s", invo_name, ci -> ci_type,
- + ci -> ci_subtype);
- + if ((cp = m_find (buffer)) == NULL || *cp == 0) {
- + (void) sprintf (buffer, "%s-store-%s", invo_name, ci -> ci_type);
- + if ((cp = m_find (buffer)) == NULL || *cp == 0)
- + cp = ct -> c_type == CT_MESSAGE ? "+" : "%m%P.%s";
- + }
- + }
- +
- + switch (*cp) {
- + case '+':
- + case '@':
- + {
- + char *folder = cp[1] ? path (cp + 1, *cp == '+' ? TFOLDER
- + : TSUBCWF)
- + : m_getfolder ();
- + struct msgs *mp = NULL;
- + struct stat st;
- +
- + if (stat (bp = m_mailpath (folder), &st) == NOTOK) {
- + int answer;
- + char *ep;
- +
- + if (errno != ENOENT) {
- + advise (bp, "error on folder");
- + goto losing_folder;
- + }
- +
- + ep = concat ("Create folder \"", bp, "\"? ", NULLCP);
- + answer = getanswer (ep);
- + free (ep);
- +
- + if (!answer)
- + goto losing_folder;
- + if (!makedir (bp)) {
- + advise (NULLCP, "unable to create folder %s", bp);
- + goto losing_folder;
- + }
- + }
- +
- + if (mp = m_gmsg (folder))
- + (void) sprintf (buffer, "%s/%d", mp -> foldpath,
- + mp -> hghmsg + 1);
- + else
- + advise (NULLCP, "unable to read folder %s", folder);
- + losing_folder: ;
- + if (cp[1])
- + free (folder);
- + if (mp)
- + m_fmsg (mp);
- + else
- + return NOTOK;
- + }
- + goto got_filename;
- +
- + case '/':
- + case '|':
- + case '!':
- + bp = buffer;
- + buffer[0] = '\0';
- + break;
- +
- + default:
- + bp = autosw ? cwd : dir;
- + (void) sprintf (buffer, "%s/", bp[1] ? bp : "");
- + bp = buffer + strlen (buffer);
- + break;
- + }
- + for (; *cp; cp++)
- + if (*cp == '%') {
- + switch (*++cp) {
- + case 'a': /* additional arguments */
- + if (buffer[0] != '|' && buffer[0] != '!') {
- + *bp++ = *--cp;
- + *bp = '\0';
- + continue;
- + }
- + else {
- + register char **ap,
- + **ep;
- + char *s = "";
- +
- + for (ap = ci -> ci_attrs, ep = ci -> ci_values;
- + *ap;
- + ap++, ep++) {
- + (void) sprintf (bp, "%s%s=\"%s\"", s, *ap, *ep);
- + bp += strlen (bp);
- + s = " ";
- + }
- + }
- + break;
- +
- + case 'm': /* message */
- + (void) sprintf (bp, "%s", r1bindex (ct -> c_file, '/'));
- + break;
- +
- + case 'P': /* .part */
- + if (ct -> c_partno)
- + (void) sprintf (bp, ".%s", ct -> c_partno);
- + break;
- +
- + case 'p': /* part */
- + if (ct -> c_partno)
- + (void) strcpy (bp, ct -> c_partno);
- + break;
- +
- + case 't': /* type */
- + (void) strcpy (bp, ci -> ci_type);
- + break;
- +
- + case 's': /* subtype */
- + (void) strcpy (bp, ci -> ci_subtype);
- + break;
- +
- + case '%':
- + goto raw;
- +
- + default:
- + *bp++ = *--cp;
- + *bp = '\0';
- + continue;
- + }
- + bp += strlen (bp);
- + }
- + else {
- + raw: ;
- + *bp++ = *cp;
- + *bp = '\0';
- + }
- + if (buffer[0] == '|' || buffer[0] == '!')
- + return show_content_aux (ct, 1, 0, buffer + 1, autosw ? cwd : dir);
- + got_filename: ;
- +
- + ct -> c_storage = add (buffer, NULLCP);
- + /*
- + if (debugsw) {
- + */
- + (void) fflush (stdout);
- +
- + fprintf (stderr, "storing message %s", ct -> c_file);
- + if (ct -> c_partno)
- + fprintf (stderr, " part %s", ct -> c_partno);
- + fprintf (stderr, " as file %s\n",
- + strncmp (ct -> c_storage, cwd, cwdlen)
- + || ct -> c_storage[cwdlen] != '/'
- + ? ct -> c_storage
- + : ct -> c_storage + cwdlen + 1);
- + /*
- + }
- + */
- +
- + if (ct -> c_encoding != CE_7BIT) {
- + int cc,
- + fd;
- +
- + if (!ct -> c_ceopenfnx) {
- + advise (NULLCP, "don't know how to decode part %s of message %s",
- + ct -> c_partno, ct -> c_file);
- + return NOTOK;
- + }
- +
- + file = appending || !strcmp (ct -> c_storage, "-") ? NULLCP
- + : ct -> c_storage;
- + if ((fd = (*ct -> c_ceopenfnx) (ct, &file)) == NOTOK)
- + return NOTOK;
- + if (strcmp (file, ct -> c_storage) == 0) {
- + (void) (*ct -> c_ceclosefnx) (ct);
- + return OK;
- + }
- +
- + if (!strcmp (ct -> c_storage, "-")) {
- + int gd;
- +
- + if ((gd = dup (fileno (stdout))) == NOTOK) {
- + advise ("stdout", "unable to dup");
- + losing: ;
- + (void) (*ct -> c_ceclosefnx) (ct);
- + return NOTOK;
- + }
- + if ((fp = fdopen (gd, appending ? "a" : "w")) == NULL) {
- + advise ("stdout", "unable to fdopen (%d, \"%s\") from", gd,
- + appending ? "a" : "w");
- + (void) close (gd);
- + goto losing;
- + }
- + }
- + else
- + if ((fp = fopen (ct -> c_storage, appending ? "a" : "w"))
- + == NULL) {
- + advise (ct -> c_storage, "unable to fopen for %s",
- + appending ? "appending" : "writing");
- + goto losing;
- + }
- +
- + if (append && !*append)
- + (void) copy_some_headers (fp, ct);
- +
- + for (;;) {
- + switch (cc = read (fd, buffer, sizeof buffer)) {
- + case NOTOK:
- + advise (file, "error reading content from");
- + break;
- +
- + case OK:
- + break;
- +
- + default:
- + (void) fwrite (buffer, sizeof *buffer, cc, fp);
- + continue;
- + }
- + break;
- + }
- +
- + (void) (*ct -> c_ceclosefnx) (ct);
- +
- + if (cc != NOTOK && fflush (fp))
- + advise (ct -> c_storage, "error writing to");
- +
- + (void) fclose (fp);
- +
- + return (cc != NOTOK ? OK : NOTOK);
- + }
- +
- + if (!ct -> c_fp && (ct -> c_fp = fopen (ct -> c_file, "r")) == NULL) {
- + advise (ct -> c_file, "unable to open for reading");
- + return NOTOK;
- + }
- +
- + (void) fseek (ct -> c_fp, pos = ct -> c_begin, 0);
- + last = ct -> c_end;
- +
- + if (!strcmp (ct -> c_storage, "-")) {
- + int gd;
- +
- + if ((gd = dup (fileno (stdout))) == NOTOK) {
- + advise ("stdout", "unable to dup");
- + return NOTOK;
- + }
- + if ((fp = fdopen (gd, appending ? "a" : "w")) == NULL) {
- + advise ("stdout", "unable to fdopen (%d, \"%s\") from", gd,
- + appending ? "a" : "w");
- + (void) close (gd);
- + return NOTOK;
- + }
- + }
- + else
- + if ((fp = fopen (ct -> c_storage, appending ? "a" : "w")) == NULL) {
- + advise (ct -> c_storage, "unable to fopen for %s",
- + appending ? "appending" : "writing");
- + return NOTOK;
- + }
- +
- + if (append && !*append) {
- + (void) copy_some_headers (fp, ct);
- + appending = 1;
- + }
- + else
- + appending = 0;
- +
- + while (fgets (buffer, sizeof buffer - 1, ct -> c_fp)) {
- + if ((pos += strlen (buffer)) > last) {
- + int diff = strlen (buffer) - (pos - last);
- +
- + if (diff >= 0)
- + buffer[diff] = '\0';
- + }
- +
- + if (appending)
- + switch (buffer[0]) {
- + case ' ':
- + case '\t':
- + if (appending < 0)
- + buffer[0] = 0;
- + break;
- +
- + case '\n':
- + appending = 0;
- + break;
- +
- + default:
- + if (!uprf (buffer, XXX_FIELD_PRF)
- + && !uprf (buffer, "Message-ID:")) {
- + appending = -1;
- + buffer[0] = 0;
- + break;
- + }
- + appending = 1;
- + break;
- + }
- +
- + (void) fputs (buffer, fp);
- + if (pos >= last)
- + break;
- + }
- +
- + if (fflush (fp))
- + advise (ct -> c_storage, "error writing to");
- +
- + (void) fclose (fp);
- +
- + (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
- +
- + return OK;
- + }
- +
- +
- + static int copy_some_headers (out, ct)
- + FILE *out;
- + register CT ct;
- + {
- + int state;
- + char buf[BUFSIZ],
- + name[NAMESZ];
- + FILE *in;
- +
- + if ((in = fopen (ct -> c_file, "r")) == NULL) {
- + advise (ct -> c_file, "unable to open for reading");
- + return NOTOK;
- + }
- +
- + for (state = FLD;;) {
- + switch (state = m_getfld (state, name, buf, sizeof buf, in)) {
- + case FLD:
- + case FLDPLUS:
- + case FLDEOF:
- + if (uprf (name, XXX_FIELD_PRF) || uleq (name, "Message-ID")) {
- + while (state == FLDPLUS)
- + state = m_getfld (state, name, buf, sizeof buf, in);
- + continue;
- + }
- +
- + fprintf (out, "%s:%s", name, buf);
- + while (state == FLDPLUS) {
- + state = m_getfld (state, name, buf, sizeof buf, in);
- + (void) fputs (buf, out);
- + }
- + if (state != FLDEOF)
- + continue;
- + /* else fall... */
- + case BODY:
- + case BODYEOF:
- + case FILEEOF:
- + break;
- +
- + case LENERR:
- + case FMTERR:
- + default:
- + break;
- + }
- +
- + break;
- + }
- +
- + (void) fclose (in);
- +
- + return OK;
- + }
- +
- + /* */
- +
- + static void free_ctinfo (ct)
- + register CT ct;
- + {
- + register char **ap;
- + register CI ci = &ct -> c_ctinfo;
- +
- + if (ci -> ci_type)
- + free (ci -> ci_type);
- + if (ci -> ci_subtype)
- + free (ci -> ci_subtype);
- + for (ap = ci -> ci_attrs; *ap; ap++)
- + free (*ap);
- + if (ci -> ci_comment)
- + free (ci -> ci_comment);
- + if (ci -> ci_magic)
- + free (ci -> ci_magic);
- + }
- +
- +
- + static void free_content (ct)
- + register CT ct;
- + {
- + if (!ct)
- + return;
- +
- + if (ct -> c_partno)
- + free (ct -> c_partno);
- +
- + if (ct -> c_vrsn)
- + free (ct -> c_vrsn);
- +
- + if (ct -> c_ctline)
- + free (ct -> c_ctline);
- +
- + free_ctinfo (ct);
- +
- + if (ct -> c_ctfreefnx)
- + (void) (*ct -> c_ctfreefnx) (ct);
- +
- + if (ct -> c_showproc)
- + free (ct -> c_showproc);
- + if (ct -> c_termproc)
- + free (ct -> c_termproc);
- + if (ct -> c_storeproc)
- + free (ct -> c_storeproc);
- +
- + if (ct -> c_celine)
- + free (ct -> c_celine);
- + if (ct -> c_cefreefnx)
- + (void) (*ct -> c_cefreefnx) (ct, 1);
- +
- + if (ct -> c_id)
- + free (ct -> c_id);
- + if (ct -> c_descr)
- + free (ct -> c_descr);
- +
- + if (ct -> c_file) {
- + if (ct -> c_unlink)
- + (void) unlink (ct -> c_file);
- + free (ct -> c_file);
- + }
- + if (ct -> c_fp)
- + (void) fclose (ct -> c_fp);
- +
- + if (ct -> c_storage)
- + (void) free (ct -> c_storage);
- +
- + free ((char *) ct);
- + }
- +
- + /* */
- +
- + static int part_ok (ct)
- + register CT ct;
- + {
- + register char **ap;
- +
- + if (ct -> c_type == CT_MULTIPART || npart == 0)
- + return 1;
- +
- + for (ap = parts; *ap; ap++)
- + if (strcmp (*ap, ct -> c_partno) == 0)
- + return 1;
- +
- + return 0;
- + }
- +
- +
- +
- + static int type_ok (ct)
- + register CT ct;
- + {
- + register char **ap;
- + char buffer[BUFSIZ];
- + register CI ci = &ct -> c_ctinfo;
- +
- + if (ct -> c_type == CT_MULTIPART || ntype == 0)
- + return 1;
- +
- + (void) sprintf (buffer, "%s/%s", ci -> ci_type, ci -> ci_subtype);
- + for (ap = types; *ap; ap++)
- + if (uleq (*ap, ci -> ci_type) || uleq (*ap, buffer))
- + return 1;
- +
- + return 0;
- + }
- +
- + /* CONTENTS */
- +
- + struct k2v {
- + char *kv_key;
- + int kv_value;
- + };
- +
- + /* TEXT */
- +
- + #define TEXT_UNKNOWN 0x00
- + #define TEXT_PLAIN 0x01
- + #define TEXT_RICHTEXT 0x02
- +
- + struct text {
- + int tx_charset;
- + #define CHARSET_UNKNOWN 0x00
- + #define CHARSET_USASCII 0x01
- + #define CHARSET_LATIN 0x02
- + };
- +
- + static struct k2v Charset[] = {
- + "us-ascii", CHARSET_USASCII,
- + "iso-8859-1", CHARSET_LATIN,
- +
- + NULL, CHARSET_UNKNOWN /* this one must be last! */
- + };
- +
- + static int free_text (ct)
- + register CT ct;
- + {
- + register struct text *t = (struct text *) ct -> c_ctparams;
- +
- + if (!t)
- + return;
- +
- + free ((char *) t);
- + ct -> c_ctparams = NULL;
- + }
- +
- +
- + static struct k2v SubText[] = {
- + "plain", TEXT_PLAIN,
- + "richtext", TEXT_RICHTEXT,
- +
- + NULL, TEXT_UNKNOWN /* this one must be last! */
- + };
- +
- + static int InitText (ct)
- + register CT ct;
- + {
- + char buffer[BUFSIZ];
- + register char **ap,
- + **ep;
- + register struct k2v *kv;
- + register CI ci = &ct -> c_ctinfo;
- +
- + if (!*ci -> ci_subtype) /* XXX: attmail bogosity! */
- + ci -> ci_subtype = add ("plain", ci -> ci_subtype);
- + for (kv = SubText; kv -> kv_key; kv++)
- + if (uleq (ci -> ci_subtype, kv -> kv_key))
- + break;
- + if ((ct -> c_subtype = kv -> kv_value) == TEXT_PLAIN) {
- + (void) sprintf (buffer, "%%p%s '%%F'",
- + progsw ? progsw
- + : moreproc && *moreproc ? moreproc : "more");
- + ct -> c_showproc = add (buffer, NULLCP);
- + }
- +
- + for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++)
- + if (uleq (*ap, "charset")) {
- + char *cp;
- + register struct text *t;
- +
- + if ((t = (struct text *) calloc (1, sizeof *t)) == NULL)
- + adios (NULLCP, "out of memory");
- + ct -> c_ctparams = (caddr_t) t;
- + ct -> c_ctfreefnx = free_text;
- +
- + for (kv = Charset; kv -> kv_key; kv++)
- + if (uleq (*ep, kv -> kv_key)) {
- + (void) sprintf (buffer, "%s-charset-%s", invo_name,
- + kv -> kv_key);
- + break;
- + }
- + t -> tx_charset = kv -> kv_value;
- + if (!kv -> kv_key)
- + (void) sprintf (buffer, "%s-charset-%s", invo_name, *ep);
- + if ((!mm_charset || !uleq (mm_charset, *ep))
- + && (cp = m_find (buffer)))
- + ct -> c_termproc = getcpy (cp);
- +
- + break;
- + }
- +
- + return OK;
- + }
- +
- + /* MULTIPART */
- +
- + #define MULTI_UNKNOWN 0x00
- + #define MULTI_MIXED 0x01
- + #define MULTI_ALTERNATE 0x02
- + #define MULTI_DIGEST 0x03
- + #define MULTI_PARALLEL 0x04
- +
- +
- + struct multipart {
- + char *mp_start;
- + char *mp_stop;
- +
- + struct part {
- + CT mp_part;
- +
- + struct part *mp_next;
- + } *mp_parts;
- + };
- +
- +
- + static int list_multi (ct, toplevel)
- + register CT ct;
- + int toplevel;
- + {
- + register struct multipart *m = (struct multipart *) ct -> c_ctparams;
- + register struct part *part;
- +
- + (void) list_content (ct, toplevel);
- +
- + for (part = m -> mp_parts; part; part = part -> mp_next) {
- + register CT p = part -> mp_part;
- +
- + if (part_ok (p) && type_ok (p) && p -> c_ctlistfnx)
- + (void) (*p -> c_ctlistfnx) (p, 0);
- + }
- +
- + return OK;
- + }
- +
- +
- + static int show_multi (ct, serial, alternate)
- + register CT ct;
- + int serial,
- + alternate;
- + {
- + int alternating,
- + nowalternate,
- + nowserial,
- + result;
- + register struct multipart *m = (struct multipart *) ct -> c_ctparams;
- + register struct part *part;
- + register CT p;
- + TYPESIG (*hstat) (), (*istat) (), (*qstat) (), (*tstat) ();
- +
- + alternating = 0;
- + nowalternate = alternate;
- + switch (ct -> c_subtype) {
- + case MULTI_PARALLEL:
- + if (!(nowserial = serialsw)) {
- + set_signals: ;
- + hstat = signal (SIGHUP, SIG_IGN);
- + istat = signal (SIGINT, SIG_IGN);
- + qstat = signal (SIGQUIT, SIG_IGN);
- + tstat = signal (SIGTERM, SIG_IGN);
- + }
- + break;
- +
- + case MULTI_ALTERNATE:
- + nowalternate = alternating = 1;
- + /* and fall... */
- + default:
- + if (!(nowserial = serial))
- + goto set_signals;
- + break;
- + }
- +
- + /* alternate -> we're inside an alternative
- + alternating -> we are an alternative
- + */
- +
- + result = OK;
- + for (part = m -> mp_parts; part; part = part -> mp_next) {
- + p = part -> mp_part;
- +
- + if (part_ok (p)
- + && type_ok (p)
- + && p -> c_ctshowfnx) {
- + switch ((*p -> c_ctshowfnx) (p, nowserial, nowalternate)) {
- + case NOTOK:
- + if (alternate && !alternating) {
- + result = NOTOK;
- + goto out;
- + }
- + continue;
- +
- + case OK:
- + case DONE:
- + if (alternating) {
- + result = DONE;
- + break;
- + }
- + if (alternate)
- + alternate = nowalternate = 0;
- + continue;
- + }
- + break;
- + }
- + }
- + if (alternating && !part) {
- + if (!alternate)
- + content_error (NULLCP, ct,
- + "don't know how to display any of the contents");
- +
- + result = NOTOK;
- + goto out;
- + }
- +
- + if (serial && !nowserial) {
- + int pid,
- + kids;
- + #if defined(BSD42) && !defined(WAITINT)
- + union wait status;
- + #else
- + int status;
- + #endif
- +
- + kids = 0;
- + for (part = m -> mp_parts; part; part = part -> mp_next) {
- + p = part -> mp_part;
- +
- + if (p -> c_pid > OK)
- + if (kill (p -> c_pid, 0) == NOTOK)
- + p -> c_pid = 0;
- + else
- + kids++;
- + }
- +
- + while (kids > 0 && (pid = wait (&status)) != NOTOK) {
- + #if defined(BSD42) && !defined(WAITINT)
- + (void) pidcheck (status.w_status);
- + #else
- + (void) pidcheck (status);
- + #endif
- +
- + for (part = m -> mp_parts; part; part = part -> mp_next) {
- + p = part -> mp_part;
- +
- + if (xpid == pid)
- + xpid = 0;
- + if (p -> c_pid == pid) {
- + p -> c_pid = 0;
- + kids--;
- + break;
- + }
- + }
- + }
- + }
- +
- + out: ;
- + if (!nowserial) {
- + (void) signal (SIGHUP, hstat);
- + (void) signal (SIGINT, istat);
- + (void) signal (SIGQUIT, qstat);
- + (void) signal (SIGTERM, tstat);
- + }
- +
- + return result;
- + }
- +
- +
- + /* ARGSUSED */
- +
- + static int store_multi (ct, unused)
- + register CT ct;
- + char *unused;
- + {
- + int result;
- + register struct multipart *m = (struct multipart *) ct -> c_ctparams;
- + register struct part *part;
- +
- + result = NOTOK;
- + for (part = m -> mp_parts; part; part = part -> mp_next) {
- + register CT p = part -> mp_part;
- +
- + if (part_ok (p)
- + && type_ok (p)
- + && p -> c_ctstorefnx
- + && (result = (*p -> c_ctstorefnx) (p, NULLCP)) == OK
- + && ct -> c_subtype == MULTI_ALTERNATE)
- + break;
- + }
- +
- + return result;
- + }
- +
- +
- + static int free_multi (ct)
- + register CT ct;
- + {
- + register struct multipart *m = (struct multipart *) ct -> c_ctparams;
- + register struct part *part,
- + *next;
- +
- + if (!m)
- + return;
- +
- + if (m -> mp_start)
- + free (m -> mp_start);
- + if (m -> mp_stop)
- + free (m -> mp_stop);
- +
- + for (part = m -> mp_parts; part; part = next) {
- + next = part -> mp_next;
- +
- + free_content (part -> mp_part);
- +
- + free ((char *) part);
- + }
- + m -> mp_parts = NULL;
- +
- + free ((char *) m);
- + ct -> c_ctparams = NULL;
- + }
- +
- +
- + static struct k2v SubMultiPart[] = {
- + "mixed", MULTI_MIXED,
- + "alternative", MULTI_ALTERNATE,
- + "digest", MULTI_DIGEST,
- + "parallel", MULTI_PARALLEL,
- +
- + NULL, MULTI_UNKNOWN /* this one must be last! */
- + };
- +
- + static int InitMultiPart (ct)
- + register CT ct;
- + {
- + int inout;
- + long last,
- + pos;
- + register char *cp,
- + *dp,
- + **ap,
- + **ep;
- + char *bp,
- + buffer[BUFSIZ];
- + register struct multipart *m;
- + register struct k2v *kv;
- + register struct part *part,
- + **next;
- + register CI ci = &ct -> c_ctinfo;
- + register CT p;
- + FILE *fp;
- +
- + ct -> c_ctshowfnx = NULL;
- + ct -> c_ctstorefnx = NULL;
- +
- + if (ct -> c_encoding != CE_7BIT) {
- + admonish (NULLCP,
- + "\"%s/%s\" type in message %s should be encoded in 7bit",
- + ci -> ci_type, ci -> ci_subtype, ct -> c_file);
- + return NOTOK;
- + }
- +
- + for (kv = SubMultiPart; kv -> kv_key; kv++)
- + if (uleq (ci -> ci_subtype, kv -> kv_key))
- + break;
- + ct -> c_subtype = kv -> kv_value;
- +
- + for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++)
- + if (uleq (*ap, "boundary")) {
- + bp = *ep;
- + break;
- + }
- + if (!*ap) {
- + advise (NULLCP,
- + "a \"boundary\" parameter is mandatory for \"%s/%s\" type in message %s's %s: field",
- + ci -> ci_type, ci -> ci_subtype, ct -> c_file, TYPE_FIELD);
- + return NOTOK;
- + }
- +
- + if ((m = (struct multipart *) calloc (1, sizeof *m)) == NULL)
- + adios (NULLCP, "out of memory");
- + ct -> c_ctparams = (caddr_t) m;
- + ct -> c_ctlistfnx = list_multi;
- + ct -> c_ctshowfnx = show_multi;
- + ct -> c_ctstorefnx = store_multi;
- + ct -> c_ctfreefnx = free_multi;
- +
- + for (cp = bp; isspace (*cp); cp++)
- + continue;
- + if (!*cp) {
- + advise (NULLCP, "invalid \"boundary\" parameter for \"%s/%s\" type in message %s's %s: field",
- + ci -> ci_type, ci -> ci_subtype, ct -> c_file, TYPE_FIELD);
- + return NOTOK;
- + }
- + for (cp = bp, dp = cp + strlen (cp) - 1; dp > cp; dp--)
- + if (!isspace (*dp))
- + break;
- + *++dp = '\0';
- + m -> mp_start = concat (bp, "\n", NULLCP);
- + m -> mp_stop = concat (bp, "--\n", NULLCP);
- +
- + if (!ct -> c_fp && (ct -> c_fp = fopen (ct -> c_file, "r")) == NULL) {
- + advise (ct -> c_file, "unable to open for reading");
- + return NOTOK;
- + }
- +
- + (void) fseek (fp = ct -> c_fp, pos = ct -> c_begin, 0);
- + last = ct -> c_end;
- +
- + next = &m -> mp_parts, part = NULL, inout = 1;
- + while (fgets (buffer, sizeof buffer - 1, fp)) {
- + if (pos > last)
- + break;
- +
- + pos += strlen (buffer);
- +
- + if (buffer[0] != '-' || buffer[1] != '-')
- + continue;
- +
- + if (inout) {
- + if (strcmp (buffer + 2, m -> mp_start))
- + continue;
- +
- + next_part: ;
- + if ((part = (struct part *) calloc (1, sizeof *part)) == NULL)
- + adios (NULLCP, "out of memory");
- + *next = part, next = &part -> mp_next;
- +
- + if ((p = get_content (fp, ct -> c_file,
- + rfc934sw && ct -> c_subtype == MULTI_DIGEST
- + ? -1 : 0)) == NULLCT) {
- + (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
- + return NOTOK;
- + }
- + p -> c_fp = NULL;
- +
- + part -> mp_part = p;
- + (void) fseek (fp, pos = p -> c_begin, 0);
- + inout = 0;
- + }
- + else
- + if (strcmp (buffer + 2, m -> mp_start) == 0) {
- + inout = 1;
- +
- + end_part: ;
- + p = part -> mp_part;
- + p -> c_end = ftell (fp) - (strlen (buffer) + 1);
- + if (p -> c_end < p -> c_begin)
- + p -> c_begin = p -> c_end;
- + if (inout)
- + goto next_part;
- + goto last_part;
- + }
- + else
- + if (strcmp (buffer + 2, m -> mp_stop) == 0)
- + goto end_part;
- + }
- + advise (NULLCP, "bogus multipart content in message %s", ct -> c_file);
- + if (!inout && part) {
- + p = part -> mp_part;
- + p -> c_end = ct -> c_end;
- +
- + if (p -> c_begin >= p -> c_end) {
- + for (next = &m -> mp_parts;
- + *next != part;
- + next = &((*next) -> mp_next))
- + continue;
- + *next = NULL;
- + free_content (p);
- + free ((char *) part);
- + }
- + }
- +
- + last_part: ;
- + if (ct -> c_subtype == MULTI_ALTERNATE && m -> mp_parts -> mp_next) {
- + register int i;
- + register struct part **base,
- + **bmp;
- +
- + i = 0;
- + for (part = m -> mp_parts; part; part = part -> mp_next)
- + i++;
- + if ((base = (struct part **) calloc ((unsigned) (i + 1), sizeof *base))
- + == NULL)
- + adios (NULLCP, "out of memory");
- + bmp = base;
- + for (part = m -> mp_parts; part; part = part -> mp_next)
- + *bmp++ = part;
- + *bmp = NULL;
- +
- + next = &m -> mp_parts;
- + for (bmp--; bmp >= base; bmp--) {
- + part = *bmp;
- + *next = part, next = &part -> mp_next;
- + }
- + *next = NULL;
- +
- + free ((char *) base);
- + }
- +
- + {
- + int partnum;
- + register char *pp;
- + char partnam[BUFSIZ];
- +
- + if (ct -> c_partno) {
- + (void) sprintf (partnam, "%s.", ct -> c_partno);
- + pp = partnam + strlen (partnam);
- + }
- + else
- + pp = partnam;
- +
- + for (part = m -> mp_parts, partnum = 1;
- + part;
- + part = part -> mp_next, partnum++) {
- + p = part -> mp_part;
- +
- + (void) sprintf (pp, "%d", partnum);
- + p -> c_partno = add (partnam, NULLCP);
- +
- + if (p -> c_ctinitfnx && (*p -> c_ctinitfnx) (p) == NOTOK) {
- + (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
- + return NOTOK;
- + }
- + }
- + }
- +
- + (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
- +
- + return OK;
- + }
- +
- + /* MESSAGE */
- +
- + #define MESSAGE_UNKNOWN 0x00
- + #define MESSAGE_RFC822 0x01
- + #define MESSAGE_PARTIAL 0x02
- + #define MESSAGE_EXTERNAL 0x03
- +
- +
- + struct partial {
- + char *pm_partid;
- +
- + int pm_partno;
- + int pm_maxno;
- +
- + int pm_marked;
- + int pm_stored;
- + };
- +
- +
- + static int list_partial (ct, toplevel)
- + register CT ct;
- + int toplevel;
- + {
- + register struct partial *p = (struct partial *) ct -> c_ctparams;
- +
- + (void) list_content (ct, toplevel);
- + if (verbosw) {
- + printf ("\t [message %s, part %d", p -> pm_partid, p -> pm_partno);
- + if (p -> pm_maxno)
- + printf (" of %d", p -> pm_maxno);
- + printf ("]\n");
- + }
- +
- + return OK;
- + }
- +
- +
- + static int ct_compar (a, b)
- + CT *a,
- + *b;
- + {
- + register struct partial *am = (struct partial *) ((*a) -> c_ctparams);
- + register struct partial *bm = (struct partial *) ((*b) -> c_ctparams);
- +
- + return (am -> pm_marked - bm -> pm_marked);
- + }
- +
- +
- + /* ARGSUSED */
- +
- + static int store_partial (ct, unused)
- + register CT ct;
- + char *unused;
- + {
- + int cur,
- + hi,
- + i;
- + register CT p,
- + *ctp,
- + *ctq;
- + CT *base;
- + struct partial *qm = (struct partial *) ct -> c_ctparams;
- +
- + if (qm -> pm_stored)
- + return OK;
- +
- + hi = i = 0;
- + for (ctp = cts; p = *ctp; ctp++)
- + if (p -> c_type == CT_MESSAGE && p -> c_subtype == ct -> c_subtype) {
- + register struct partial *pm = (struct partial *) p -> c_ctparams;
- +
- + if (!pm -> pm_stored
- + && strcmp (qm -> pm_partid, pm -> pm_partid) == 0) {
- + pm -> pm_marked = pm -> pm_partno;
- + if (pm -> pm_maxno)
- + hi = pm -> pm_maxno;
- + pm -> pm_stored = 1;
- + i++;
- + }
- + else
- + pm -> pm_marked = 0;
- + }
- + if (hi == 0) {
- + advise (NULLCP, "missing (at least) last part of multipart message");
- + return NOTOK;
- + }
- +
- + if ((base = (CT *) calloc ((unsigned) (i + 1), sizeof *base)) == NULL)
- + adios (NULLCP, "out of memory");
- +
- + ctq = base;
- + for (ctp = cts; p = *ctp; ctp++)
- + if (p -> c_type == CT_MESSAGE && p -> c_subtype == ct -> c_subtype) {
- + register struct partial *pm = (struct partial *) p -> c_ctparams;
- +
- + if (pm -> pm_marked)
- + *ctq++ = p;
- + }
- + *ctq = NULL;
- +
- + if (i > 1)
- + qsort ((char *) base, i, sizeof *base, ct_compar);
- +
- + cur = 1;
- + for (ctq = base; p = *ctq; ctq++) {
- + register struct partial *pm = (struct partial *) p -> c_ctparams;
- +
- + if (pm -> pm_marked != cur) {
- + if (pm -> pm_marked == cur - 1) {
- + admonish (NULLCP,
- + "duplicate part %d of %d part multipart message",
- + pm -> pm_marked, hi);
- + continue;
- + }
- +
- + missing_part: ;
- + advise (NULLCP,
- + "missing %spart %d of %d part multipart message",
- + cur != hi ? "(at least) " : "", cur, hi);
- + goto losing;
- + }
- + else
- + cur++;
- + }
- + if (hi != --cur) {
- + cur = hi;
- + goto missing_part;
- + }
- +
- + ctq = base;
- + ct = *ctq++;
- + if (store_content (ct, "") == NOTOK) {
- + losing: ;
- + free ((char *) base);
- + return NOTOK;
- + }
- +
- + for (; p = *ctq; ctq++)
- + if (store_content (p, ct -> c_storage) == NOTOK)
- + goto losing;
- +
- + free ((char *) base);
- + return OK;
- + }
- +
- +
- + static int free_partial (ct)
- + register CT ct;
- + {
- + register struct partial *p = (struct partial *) ct -> c_ctparams;
- +
- + if (!p)
- + return;
- +
- + if (p -> pm_partid)
- + free (p -> pm_partid);
- +
- + free ((char *) p);
- + ct -> c_ctparams = NULL;
- + }
- +
- +
- + struct exbody {
- + CT eb_parent;
- + CT eb_content;
- + char *eb_partno;
- +
- + char *eb_access;
- + int eb_flags;
- +
- + char *eb_name;
- + char *eb_permission;
- +
- + char *eb_site;
- + char *eb_dir;
- + char *eb_mode;
- +
- + char *eb_server;
- + char *eb_body;
- +
- + unsigned long
- + eb_size;
- + };
- +
- +
- + static int openFile ();
- + static int openFTP ();
- + static int openMail ();
- +
- + /* NOTE WELL: si_key MUST NOT have value of NOTOK */
- +
- + static struct str2init str2methods[] = {
- + "afs", 1, openFile,
- + "anon-ftp", 1, openFTP,
- + "ftp", 0, openFTP,
- + "local-file", 0, openFile,
- + "mail-server", 0, openMail,
- +
- + NULL
- + };
- +
- +
- + static int params_external (ct, composing)
- + register CT ct;
- + int composing;
- + {
- + register char **ap,
- + **ep;
- + register struct exbody *e = (struct exbody *) ct -> c_ctparams;
- + register CI ci = &ct -> c_ctinfo;
- +
- + for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++) {
- + if (uleq (*ap, "access-type")) {
- + register struct str2init *s2i;
- + register CT p = e -> eb_content;
- +
- + for (s2i = str2methods; s2i -> si_key; s2i++)
- + if (uleq (*ep, s2i -> si_key))
- + break;
- + if (!s2i -> si_key) {
- + e -> eb_access = *ep;
- + e -> eb_flags = NOTOK;
- + p -> c_encoding = CE_EXTERNAL;
- + continue;
- + }
- + e -> eb_access = s2i -> si_key;
- + e -> eb_flags = s2i -> si_value;
- + p -> c_encoding = CE_EXTERNAL;
- + if (init_encoding (p, s2i -> si_init) == NOTOK)
- + return NOTOK;
- + continue;
- + }
- + if (uleq (*ap, "name")) {
- + e -> eb_name = *ep;
- + continue;
- + }
- + if (uleq (*ap, "permission")) {
- + e -> eb_permission = *ep;
- + continue;
- + }
- + if (uleq (*ap, "site")) {
- + e -> eb_site = *ep;
- + continue;
- + }
- + if (uleq (*ap, "directory")) {
- + e -> eb_dir = *ep;
- + continue;
- + }
- + if (uleq (*ap, "mode")) {
- + e -> eb_mode = *ep;
- + continue;
- + }
- + if (uleq (*ap, "size")) {
- + (void) sscanf (*ep, "%lu", &e -> eb_size);
- + continue;
- + }
- + if (uleq (*ap, "server")) {
- + e -> eb_server = *ep;
- + continue;
- + }
- + if (composing && uleq (*ap, "body")) {
- + e -> eb_body = getcpy (*ep);
- + continue;
- + }
- + }
- +
- + if (!e -> eb_access) {
- + advise (NULLCP,
- + "invalid parameters for \"%s/%s\" type in message %s's %s field",
- + ci -> ci_type, ci -> ci_subtype,
- + ct -> c_file, TYPE_FIELD);
- + return NOTOK;
- + }
- +
- + return OK;
- + }
- +
- + static int list_external (ct, toplevel)
- + register CT ct;
- + int toplevel;
- + {
- + register struct exbody *e = (struct exbody *) ct -> c_ctparams;
- +
- + (void) list_content (ct, toplevel);
- + if (verbosw) {
- + if (e -> eb_name)
- + printf ("\t retrieve %s\n", e -> eb_name);
- + if (e -> eb_dir)
- + printf ("\t in directory %s\n", e -> eb_dir);
- + if (e -> eb_site)
- + printf ("\t from %s\n", e -> eb_site);
- + if (e -> eb_server)
- + printf ("\t from mailbox %s\n", e -> eb_server);
- + printf ("\t using %s", e -> eb_access);
- + if (e -> eb_mode)
- + printf (" (in %s mode)", e -> eb_mode);
- + if (e -> eb_permission)
- + printf (" (permission %s)", e -> eb_permission);
- + if (e -> eb_flags == NOTOK)
- + printf (" [service unavailable]");
- + printf ("\n");
- + }
- + (void) list_content (e -> eb_content, 0);
- +
- + return OK;
- + }
- +
- +
- + static int show_external (ct, serial, alternate)
- + register CT ct;
- + int serial,
- + alternate;
- + {
- + register struct exbody *e = (struct exbody *) ct -> c_ctparams;
- + register CT p = e -> eb_content;
- +
- + if (!type_ok (p))
- + return OK;
- +
- + if (p -> c_ctshowfnx)
- + return (*p -> c_ctshowfnx) (p, serial, alternate);
- +
- + content_error (NULLCP, p, "don't know how to display content");
- + return NOTOK;
- + }
- +
- +
- + static int store_external (ct)
- + register CT ct;
- + {
- + int result = NOTOK;
- + register struct exbody *e = (struct exbody *) ct -> c_ctparams;
- + register CT p = e -> eb_content;
- +
- + if (!type_ok (p))
- + return OK;
- +
- + p -> c_partno = ct -> c_partno;
- + if (p -> c_ctstorefnx)
- + result = (*p -> c_ctstorefnx) (p, NULLCP);
- + p -> c_partno = NULL;
- +
- + return result;
- + }
- +
- +
- + static int free_external (ct)
- + register CT ct;
- + {
- + register struct exbody *e = (struct exbody *) ct -> c_ctparams;
- +
- + if (!e)
- + return;
- +
- + free_content (e -> eb_content);
- + if (e -> eb_body)
- + free (e -> eb_body);
- +
- + free ((char *) e);
- + ct -> c_ctparams = NULL;
- + }
- +
- +
- + static struct k2v SubMessage[] = {
- + "rfc822", MESSAGE_RFC822,
- + "partial", MESSAGE_PARTIAL,
- + "external-body", MESSAGE_EXTERNAL,
- +
- + NULL, MESSAGE_UNKNOWN /* this one must be last! */
- + };
- +
- + static int InitMessage (ct)
- + register CT ct;
- + {
- + register struct k2v *kv;
- + register CI ci = &ct -> c_ctinfo;
- +
- + if (ct -> c_encoding != CE_7BIT) {
- + admonish (NULLCP,
- + "\"%s/%s\" type in message %s should be encoded in 7bit",
- + ci -> ci_type, ci -> ci_subtype, ct -> c_file);
- + return NOTOK;
- + }
- +
- + if (!*ci -> ci_subtype) /* XXX: attmail bogosity! */
- + ci -> ci_subtype = add ("rfc822", ci -> ci_subtype);
- + for (kv = SubMessage; kv -> kv_key; kv++)
- + if (uleq (ci -> ci_subtype, kv -> kv_key))
- + break;
- +
- + switch (ct -> c_subtype = kv -> kv_value) {
- + case MESSAGE_RFC822:
- + ct -> c_showproc = add ("%pshow -file '%F'", NULLCP);
- + break;
- +
- + case MESSAGE_PARTIAL:
- + {
- + register char **ap,
- + **ep;
- + register struct partial *p;
- +
- + ct -> c_ctshowfnx = NULL;
- + ct -> c_ctstorefnx = NULL;
- +
- + if ((p = (struct partial *) calloc (1, sizeof *p)) == NULL)
- + adios (NULLCP, "out of memory");
- + ct -> c_ctparams = (caddr_t) p;
- + ct -> c_ctfreefnx = free_partial;
- +
- + for (ap = ci -> ci_attrs, ep = ci -> ci_values;
- + *ap;
- + ap++, ep++) {
- + if (uleq (*ap, "id")) {
- + p -> pm_partid = add (*ep, NULLCP);
- +
- + continue;
- + }
- +
- + if (uleq (*ap, "number")) {
- + if (sscanf (*ep, "%d", &p -> pm_partno) != 1
- + || p -> pm_partno < 1) {
- + invalid_param: ;
- + advise (NULLCP,
- + "invalid %s parameter for \"%s/%s\" type in message %s's %s field",
- + *ap, ci -> ci_type, ci -> ci_subtype,
- + ct -> c_file, TYPE_FIELD);
- + return NOTOK;
- + }
- +
- + continue;
- + }
- +
- + if (uleq (*ap, "total")) {
- + if (sscanf (*ep, "%d", &p -> pm_maxno) != 1
- + || p -> pm_maxno < 1)
- + goto invalid_param;
- +
- + continue;
- + }
- + }
- +
- + if (!p -> pm_partid
- + || !p -> pm_partno
- + || (p -> pm_maxno && p -> pm_partno > p -> pm_maxno)) {
- + advise (NULLCP,
- + "invalid parameters for \"%s/%s\" type in message %s's %s field",
- + ci -> ci_type, ci -> ci_subtype,
- + ct -> c_file, TYPE_FIELD);
- + return NOTOK;
- + }
- +
- + ct -> c_ctlistfnx = list_partial;
- + ct -> c_ctstorefnx = store_partial;
- + }
- + break;
- +
- + case MESSAGE_EXTERNAL:
- + {
- + int exresult;
- + register struct exbody *e;
- + CT p;
- + FILE *fp;
- +
- + ct -> c_ctshowfnx = NULL;
- + ct -> c_ctstorefnx = NULL;
- +
- + if ((e = (struct exbody *) calloc (1, sizeof *e)) == NULL)
- + adios (NULLCP, "out of memory");
- + ct -> c_ctparams = (caddr_t) e;
- + ct -> c_ctfreefnx = free_external;
- +
- + if (!ct -> c_fp
- + && (ct -> c_fp = fopen (ct -> c_file, "r")) == NULL) {
- + advise (ct -> c_file, "unable to open for reading");
- + return NOTOK;
- + }
- +
- + (void) fseek (fp = ct -> c_fp, ct -> c_begin, 0);
- +
- + if ((p = get_content (fp, ct -> c_file, 0)) == NULLCT) {
- + (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
- + return NOTOK;
- + }
- +
- + e -> eb_parent = ct;
- + e -> eb_content = p;
- + p -> c_ctextern = (caddr_t) e;
- + if ((exresult = params_external (ct, 0)) != NOTOK
- + && p -> c_ceopenfnx == openMail) {
- + int cc,
- + size;
- + char *bp;
- +
- + if ((size = ct -> c_end - p -> c_begin) <= 0) {
- + content_error (NULLCP, ct,
- + "empty body for access-type=mail-server");
- + goto no_body;
- + }
- +
- + if ((e -> eb_body = bp = malloc ((unsigned) size)) == NULL)
- + adios (NULLCP, "out of memory");
- + (void) fseek (p -> c_fp, p -> c_begin, 0);
- + while (size > 0)
- + switch (cc = fread (bp, sizeof *bp, size, p -> c_fp)) {
- + case NOTOK:
- + adios ("failed", "fread");
- +
- + case OK:
- + adios (NULLCP, "unexpected EOF from fread");
- +
- + default:
- + bp += cc, size -= cc;
- + break;
- + }
- + *bp = 0;
- + no_body: ;
- + }
- + p -> c_fp = NULL;
- + p -> c_end = p -> c_begin;
- +
- + (void) fclose (ct -> c_fp), ct -> c_fp = NULL;
- +
- + ct -> c_ctlistfnx = list_external;
- +
- + if (exresult == NOTOK)
- + return NOTOK;
- + if (e -> eb_flags == NOTOK)
- + return OK;
- +
- + if (e -> eb_name && autosw) {
- + char *cp = e -> eb_name;
- +
- + if (*cp != '/'
- + && *cp != '.'
- + && *cp != '|'
- + && *cp != '!'
- + && !index (cp, '%')) {
- + if (!ct -> c_storeproc)
- + ct -> c_storeproc = add (cp, NULLCP);
- + if (!p -> c_storeproc)
- + p -> c_storeproc = add (cp, NULLCP);
- + }
- + }
- +
- + ct -> c_ctshowfnx = show_external;
- + ct -> c_ctstorefnx = store_external;
- + switch (p -> c_type) {
- + case CT_MULTIPART:
- + break;
- +
- + case CT_MESSAGE:
- + if (p -> c_subtype != MESSAGE_RFC822)
- + break;
- + /* else fall... */
- + default:
- + e -> eb_partno = ct -> c_partno;
- + if (p -> c_ctinitfnx)
- + (void) (*p -> c_ctinitfnx) (p);
- + break;
- + }
- + }
- + break;
- +
- + default:
- + break;
- + }
- +
- + return OK;
- + }
- +
- +
- + /* APPLICATION */
- +
- + #define APPLICATION_UNKNOWN 0x00
- + #define APPLICATION_OCTETS 0x01
- + #define APPLICATION_ODA 0x02
- + #define APPLICATION_POSTSCRIPT 0x03
- +
- +
- + static int list_application (ct, toplevel)
- + register CT ct;
- + int toplevel;
- + {
- + (void) list_content (ct, toplevel);
- + if (verbosw) {
- + register char **ap,
- + **ep;
- + register CI ci = &ct -> c_ctinfo;
- +
- + for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++)
- + printf ("\t %s=\"%s\"\n", *ap, *ep);
- + }
- +
- + return OK;
- + }
- +
- +
- + static struct k2v SubApplication[] = {
- + "octet-stream", APPLICATION_OCTETS,
- + "oda", APPLICATION_ODA,
- + "postscript", APPLICATION_POSTSCRIPT,
- + NULL, APPLICATION_UNKNOWN /* this one must be last! */
- + };
- +
- + static int InitApplication (ct)
- + register CT ct;
- + {
- + register char **ap,
- + **ep;
- + register struct k2v *kv;
- + register CI ci = &ct -> c_ctinfo;
- +
- + ct -> c_ctlistfnx = list_application;
- +
- + for (kv = SubApplication; kv -> kv_key; kv++)
- + if (uleq (ci -> ci_subtype, kv -> kv_key))
- + break;
- +
- + if (autosw && !ct -> c_storeproc)
- + for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++)
- + if (uleq (*ap, "name")) {
- + register char *cp;
- +
- + if (*(cp = *ep) != '/'
- + && *cp != '.'
- + && *cp != '|'
- + && *cp != '!'
- + && !index (cp, '%'))
- + ct -> c_storeproc = add (cp, NULLCP);
- + break;
- + }
- +
- + if ((ct -> c_subtype = kv -> kv_value) == APPLICATION_OCTETS) {
- + int tarP,
- + zP;
- +
- + tarP = zP = 0;
- + for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++) {
- + if (uleq (*ap, "type")) {
- + if (!uleq (*ep, "tar"))
- + break;
- +
- + tarP = 1;
- + continue;
- + }
- +
- + if (uleq (*ap, "conversions")
- + && (uleq (*ep, "compress") || uleq (*ep, "x-compress"))) {
- + zP = 1;
- + continue;
- + }
- + }
- +
- + if (tarP) {
- + ct -> c_showproc = add (zP ? "%euncompress | tar tvf -"
- + : "%etar tvf -", NULLCP);
- + if (!ct -> c_storeproc)
- + if (autosw) {
- + ct -> c_storeproc = add (zP ? "| uncompress | tar xvpf -"
- + : "| tar xvpf -", NULLCP);
- + ct -> c_umask = 0022;
- + }
- + else
- + ct -> c_storeproc = add (zP ? "%m%P.tar.Z" : "%m%P.tar",
- + NULLCP);
- + }
- + }
- +
- + return OK;
- + }
- +
- + /* ENCODINGS */
- +
- + struct cefile {
- + char *ce_file;
- + int ce_unlink;
- +
- + FILE *ce_fp;
- + };
- +
- +
- + static int list_encoding (ct)
- + register CT ct;
- + {
- + register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
- +
- + if (ce)
- + fprintf (stderr, " decoded fp 0x%x file \"%s\"\n", ce -> ce_fp,
- + ce -> ce_file ? ce -> ce_file : "");
- +
- + return OK;
- + }
- +
- +
- + static int close_encoding (ct)
- + register CT ct;
- + {
- + register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
- +
- + if (!ce)
- + return;
- +
- + if (ce -> ce_fp) {
- + (void) fclose (ce -> ce_fp);
- + ce -> ce_fp = NULL;
- + }
- + }
- +
- +
- + static unsigned long size_encoding (ct)
- + register CT ct;
- + {
- + int fd;
- + unsigned long size;
- + char *file;
- + register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
- + struct stat st;
- +
- + if (!ce) {
- + estimate: ;
- +
- + return (ct -> c_end - ct -> c_begin);
- + }
- +
- + if (ce -> ce_fp && fstat (fileno (ce -> ce_fp), &st) != NOTOK)
- + return st.st_size;
- +
- + if (ce -> ce_file)
- + return stat (ce -> ce_file, &st) != NOTOK ? st.st_size : 0L;
- +
- + if (ct -> c_encoding == CE_EXTERNAL)
- + goto estimate;
- +
- + file = NULL;
- + if ((fd = (*ct -> c_ceopenfnx) (ct, &file)) == NOTOK)
- + goto estimate;
- +
- + size = fstat (fd, &st) != NOTOK ? st.st_size : 0L;
- +
- + (*ct -> c_ceclosefnx) (ct);
- +
- + return size;
- + }
- +
- +
- + static int free_encoding (ct, toplevel)
- + register CT ct;
- + int toplevel;
- + {
- + register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
- +
- + if (!ce)
- + return;
- +
- + if (ce -> ce_fp) {
- + (void) fclose (ce -> ce_fp);
- + ce -> ce_fp = NULL;
- + }
- +
- + if (ce -> ce_file) {
- + if (ce -> ce_unlink)
- + (void) unlink (ce -> ce_file);
- + free (ce -> ce_file);
- + }
- +
- + if (toplevel) {
- + free ((char *) ce);
- + ct -> c_ceparams = NULL;
- + }
- + else
- + ct -> c_ceopenfnx = NULL;
- + }
- +
- +
- + static init_encoding (ct, openfnx)
- + register CT ct;
- + int (*openfnx) ();
- + {
- + register struct cefile *ce;
- +
- + if ((ce = (struct cefile *) calloc (1, sizeof *ce)) == NULL)
- + adios (NULLCP, "out of memory");
- +
- + ct -> c_ceparams = (caddr_t) ce;
- + ct -> c_ceopenfnx = openfnx;
- + ct -> c_ceclosefnx = close_encoding;
- + ct -> c_cesizefnx = size_encoding;
- + ct -> c_celistfnx = list_encoding;
- + ct -> c_cefreefnx = free_encoding;
- +
- + return OK;
- + }
- +
- + /* BASE64 */
- +
- + static unsigned char b642nib[0x80] = {
- + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- + 0xff, 0xff, 0xff, 0x3e, 0xff, 0xff, 0xff, 0x3f,
- + 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b,
- + 0x3c, 0x3d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- + 0xff, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
- + 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
- + 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16,
- + 0x17, 0x18, 0x19, 0xff, 0xff, 0xff, 0xff, 0xff,
- + 0xff, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20,
- + 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
- + 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30,
- + 0x31, 0x32, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff
- + };
- +
- +
- + static int openBase64 (ct, file)
- + register CT ct;
- + char **file;
- + {
- + int bitno,
- + cc,
- + fd,
- + len,
- + skip;
- + unsigned long bits;
- + register char *cp,
- + *ep;
- + unsigned char value,
- + *b = (unsigned char *) &bits,
- + *b1 = &b[endian > 0 ? 1 : 2],
- + *b2 = &b[endian > 0 ? 2 : 1],
- + *b3 = &b[endian > 0 ? 3 : 0];
- + char buffer[BUFSIZ];
- + register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
- +
- + if (ce -> ce_fp)
- + goto ready_to_go;
- + if (ce -> ce_file) {
- + if ((ce -> ce_fp = fopen (ce -> ce_file, "r")) == NULL) {
- + content_error (ce -> ce_file, ct, "unable to fopen for reading");
- + return NOTOK;
- + }
- +
- + *file = ce -> ce_file;
- + return fileno (ce -> ce_fp);
- + }
- +
- + ce -> ce_unlink = *file == NULL;
- + if ((ce -> ce_fp = fopen (ce -> ce_file =
- + add (*file ? *file : m_scratch ("", tmp),
- + NULLCP),
- + "w+")) == NULL) {
- + content_error (ce -> ce_file, ct,
- + "unable to fopen for writing and reading");
- + return NOTOK;
- + }
- +
- + if ((len = ct -> c_end - ct -> c_begin) < 0)
- + adios (NULLCP, "internal error(1)");
- +
- + if (!ct -> c_fp && (ct -> c_fp = fopen (ct -> c_file, "r")) == NULL) {
- + content_error (ct -> c_file, ct, "unable to open for reading");
- + return NOTOK;
- + }
- +
- + (void) lseek (fd = fileno (ct -> c_fp), ct -> c_begin, 0);
- + bitno = 18, bits = 0L, skip = 0;
- + while (len > 0)
- + switch (cc = read (fd, buffer, sizeof buffer - 1)) {
- + case NOTOK:
- + content_error (ct -> c_file, ct, "error reading from");
- + goto clean_up;
- +
- + case OK:
- + content_error (NULLCP, ct, "premature eof");
- + goto clean_up;
- +
- + default:
- + if (cc > len)
- + cc = len;
- + len -= cc;
- +
- + for (ep = (cp = buffer) + cc; cp < ep; cp++)
- + switch (*cp) {
- + default:
- + if (isspace (*cp))
- + break;
- + if (skip
- + || (*cp & 0x80)
- + || (value = b642nib[*cp & 0x7f]) > 0x3f) {
- + if (debugsw)
- + fprintf (stderr,
- + "*cp=0x%x pos=%ld skip=%d\n", *cp,
- + lseek (fd, 0L, 1) - (ep - cp),
- + skip);
- + content_error (NULLCP, ct,
- + "invalid BASE64 encoding -- continuing");
- + continue;
- + }
- +
- + bits |= value << bitno;
- + test_end: ;
- + if ((bitno -= 6) < 0) {
- + (void) putc ((char) *b1, ce -> ce_fp);
- + if (skip < 2) {
- + (void) putc ((char) *b2, ce -> ce_fp);
- + if (skip < 1)
- + (void) putc ((char) *b3, ce -> ce_fp);
- + }
- +
- + if (ferror (ce -> ce_fp)) {
- + content_error (ce -> ce_file, ct,
- + "error writing to");
- + goto clean_up;
- + }
- + bitno = 18, bits = 0L, skip = 0;
- + }
- + break;
- +
- + case '=':
- + if (++skip > 3)
- + goto self_delimiting;
- + goto test_end;
- + }
- + }
- + if (bitno != 18) {
- + if (debugsw)
- + fprintf (stderr, "premature ending (bitno %d)\n", bitno);
- +
- + content_error (NULLCP, ct, "invalid BASE64 encoding");
- + goto clean_up;
- + }
- + self_delimiting: ;
- + (void) fseek (ct -> c_fp, 0L, 0);
- +
- + if (fflush (ce -> ce_fp)) {
- + content_error (ce -> ce_file, ct, "error writing to");
- + goto clean_up;
- + }
- +
- + ready_to_go: ;
- + (void) fseek (ce -> ce_fp, 0L, 0);
- + *file = ce -> ce_file;
- + return fileno (ce -> ce_fp);
- +
- + clean_up: ;
- + free_encoding (ct, 0);
- +
- + return NOTOK;
- + }
- +
- +
- + static int InitBase64 (ct)
- + register CT ct;
- + {
- + return init_encoding (ct, openBase64);
- + }
- +
- +
- + static int set_endian ()
- + {
- + union {
- + long l;
- + char c[sizeof (long)];
- + } un;
- +
- + un.l = 1;
- + endian = un.c[0] ? -1 : 1;
- + if (debugsw)
- + fprintf (stderr, "%s endian architecture\n",
- + endian > 0 ? "big" : "little");
- +
- + mm_charset = getenv ("MM_CHARSET");
- + }
- +
- + /* QUOTED */
- +
- + static char hex2nib[0x80] = {
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
- + 0x08, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
- + };
- +
- +
- + static int openQuoted (ct, file)
- + register CT ct;
- + char **file;
- + {
- + int cc,
- + len,
- + quoted;
- + register char *cp,
- + *ep;
- + char buffer[BUFSIZ];
- + unsigned char mask;
- + register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
- +
- + if (ce -> ce_fp)
- + goto ready_to_go;
- + if (ce -> ce_file) {
- + if ((ce -> ce_fp = fopen (ce -> ce_file, "r")) == NULL) {
- + content_error (ce -> ce_file, ct, "unable to fopen for reading");
- + return NOTOK;
- + }
- +
- + *file = ce -> ce_file;
- + return fileno (ce -> ce_fp);
- + }
- +
- + ce -> ce_unlink = *file == NULL;
- + if ((ce -> ce_fp = fopen (ce -> ce_file =
- + add (*file ? *file : m_scratch ("", tmp),
- + NULLCP),
- + "w+")) == NULL) {
- + content_error (ce -> ce_file, ct,
- + "unable to fopen for writing and reading");
- + return NOTOK;
- + }
- +
- + if ((len = ct -> c_end - ct -> c_begin) < 0)
- + adios (NULLCP, "internal error(2)");
- +
- + if (!ct -> c_fp && (ct -> c_fp = fopen (ct -> c_file, "r")) == NULL) {
- + content_error (ct -> c_file, ct, "unable to open for reading");
- + return NOTOK;
- + }
- +
- + (void) fseek (ct -> c_fp, ct -> c_begin, 0);
- + quoted = 0;
- + #ifdef lint
- + mask = 0;
- + #endif
- + while (len > 0) {
- + char *dp;
- +
- + if (fgets (buffer, sizeof buffer - 1, ct -> c_fp) == NULL) {
- + content_error (NULLCP, ct, "premature eof");
- + goto clean_up;
- + }
- +
- + if ((cc = strlen (buffer)) > len)
- + cc = len;
- + len -= cc;
- +
- + for (ep = (cp = buffer) + cc - 1; cp <= ep; ep--)
- + if (!isspace (*ep))
- + break;
- + *++ep = '\n', ep++;
- +
- + for (; cp < ep; cp++) {
- + if (quoted) {
- + if (quoted > 1) {
- + if (!isxdigit (*cp)) {
- + invalid_hex: ;
- + dp = "expecting hexidecimal-digit";
- + goto invalid_encoding;
- + }
- + mask <<= 4;
- + mask |= hex2nib[*cp & 0x7f];
- + (void) putc (mask, ce -> ce_fp);
- + }
- + else
- + switch (*cp) {
- + case ':':
- + (void) putc (*cp, ce -> ce_fp);
- + break;
- +
- + default:
- + if (!isxdigit (*cp))
- + goto invalid_hex;
- + mask = hex2nib[*cp & 0x7f];
- + quoted = 2;
- + continue;
- + }
- +
- + if (ferror (ce -> ce_fp)) {
- + content_error (ce -> ce_file, ct, "error writing to");
- + goto clean_up;
- + }
- + quoted = 0;
- + continue;
- + }
- +
- + switch (*cp) {
- + default:
- + if (*cp < '!' || *cp > '~') {
- + int i;
- + dp = "expecting character in range [!..~]";
- +
- + invalid_encoding: ;
- + i = strlen (invo_name) + 2;
- + content_error (NULLCP, ct,
- + "invalid QUOTED-PRINTABLE encoding -- %s,\n%*.*sbut got char 0x%x",
- + dp, i, i, "", *cp);
- + goto clean_up;
- + }
- + /* and fall...*/
- + case ' ':
- + case '\t':
- + case '\n':
- + (void) putc (*cp, ce -> ce_fp);
- + if (ferror (ce -> ce_fp)) {
- + content_error (ce -> ce_file, ct, "error writing to");
- + goto clean_up;
- + }
- + break;
- +
- + case '=':
- + if (*++cp != '\n') {
- + quoted = 1;
- + cp--;
- + }
- + break;
- + }
- + }
- + }
- + if (quoted) {
- + content_error (NULLCP, ct,
- + "invalid QUOTED-PRINTABLE encoding -- end-of-content while still quoting");
- + goto clean_up;
- + }
- + (void) fseek (ct -> c_fp, 0L, 0);
- +
- + if (fflush (ce -> ce_fp)) {
- + content_error (ce -> ce_file, ct, "error writing to");
- + goto clean_up;
- + }
- +
- + ready_to_go: ;
- + (void) fseek (ce -> ce_fp, 0L, 0);
- + *file = ce -> ce_file;
- + return fileno (ce -> ce_fp);
- +
- + clean_up: ;
- + free_encoding (ct, 0);
- +
- + return NOTOK;
- + }
- +
- +
- + static int InitQuoted (ct)
- + register CT ct;
- + {
- + return init_encoding (ct, openQuoted);
- + }
- +
- + /* 7BIT */
- +
- + static int open7Bit (ct, file)
- + register CT ct;
- + char **file;
- + {
- + int cc,
- + fd,
- + len;
- + char buffer[BUFSIZ];
- + register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
- +
- + if (ce -> ce_fp)
- + goto ready_to_go;
- + if (ce -> ce_file) {
- + if ((ce -> ce_fp = fopen (ce -> ce_file, "r")) == NULL) {
- + content_error (ce -> ce_file, ct, "unable to fopen for reading");
- + return NOTOK;
- + }
- +
- + *file = ce -> ce_file;
- + return fileno (ce -> ce_fp);
- + }
- +
- + ce -> ce_unlink = *file == NULL;
- + if ((ce -> ce_fp = fopen (ce -> ce_file =
- + add (*file ? *file : m_scratch ("", tmp),
- + NULLCP),
- + "w+")) == NULL) {
- + content_error (ce -> ce_file, ct,
- + "unable to fopen for writing and reading");
- + return NOTOK;
- + }
- +
- + if ((len = ct -> c_end - ct -> c_begin) < 0)
- + adios (NULLCP, "internal error(3)");
- +
- + if (!ct -> c_fp && (ct -> c_fp = fopen (ct -> c_file, "r")) == NULL) {
- + content_error (ct -> c_file, ct, "unable to open for reading");
- + return NOTOK;
- + }
- +
- + (void) lseek (fd = fileno (ct -> c_fp), ct -> c_begin, 0);
- + while (len > 0)
- + switch (cc = read (fd, buffer, sizeof buffer - 1)) {
- + case NOTOK:
- + content_error (ct -> c_file, ct, "error reading from");
- + goto clean_up;
- +
- + case OK:
- + content_error (NULLCP, ct, "premature eof");
- + goto clean_up;
- +
- + default:
- + if (cc > len)
- + cc = len;
- + len -= cc;
- +
- + (void) fwrite (buffer, sizeof *buffer, cc, ce -> ce_fp);
- + if (ferror (ce -> ce_fp)) {
- + content_error (ce -> ce_file, ct, "error writing to");
- + goto clean_up;
- + }
- + }
- + (void) fseek (ct -> c_fp, 0L, 0);
- +
- + if (fflush (ce -> ce_fp)) {
- + content_error (ce -> ce_file, ct, "error writing to");
- + goto clean_up;
- + }
- +
- + ready_to_go: ;
- + (void) fseek (ce -> ce_fp, 0L, 0);
- + *file = ce -> ce_file;
- + return fileno (ce -> ce_fp);
- +
- + clean_up: ;
- + free_encoding (ct, 0);
- +
- + return NOTOK;
- + }
- +
- +
- + static int Init7Bit (ct)
- + register CT ct;
- + {
- + if (init_encoding (ct, open7Bit) == NOTOK)
- + return NOTOK;
- + ct -> c_cesizefnx = NULL;
- +
- + return OK;
- + }
- +
- + /* External */
- +
- + static int openExternal (ct, ce, file, fd)
- + register CT ct;
- + struct cefile *ce;
- + char **file;
- + int *fd;
- + {
- + char *id;
- +
- + if (ce -> ce_fp) {
- + (void) fseek (ce -> ce_fp, 0L, 0);
- +
- + ready_already: ;
- + *file = ce -> ce_file, *fd = fileno (ce -> ce_fp);
- + return DONE;
- + }
- +
- + if (ce -> ce_file) {
- + if ((ce -> ce_fp = fopen (ce -> ce_file, "r")) == NULL) {
- + content_error (ce -> ce_file, ct, "unable to fopen for reading");
- + return NOTOK;
- + }
- +
- + goto ready_already;
- + }
- +
- + if (xpid) {
- + (void) pidcheck (pidwait (xpid, NOTOK));
- + xpid = 0;
- + }
- +
- + if (cache && (id = ct -> c_id)) {
- + char buffer[BUFSIZ];
- +
- + (void) sprintf (buffer, "%s/%s", cache, id = trimcpy (id));
- + free (id);
- +
- + id = getcpy (buffer);
- + if (ce -> ce_fp = fopen (id, "r")) {
- + struct stat st;
- +
- + (void) fstat (fileno (ce -> ce_fp), &st);
- + (void) sprintf (buffer,
- + "Use cached copy %s of size %lu octets (content %s)? ",
- + id, (unsigned long) st.st_size,
- + ct -> c_partno);
- + if (getanswer (buffer)) {
- + ce -> ce_unlink = 0;
- + ce -> ce_file = id;
- + goto ready_already;
- + }
- +
- + (void) fclose (ce -> ce_fp), ce -> ce_fp = NULL;
- + }
- + free (id);
- + }
- +
- + return OK;
- + }
- +
- + /* File */
- +
- + static int openFile (ct, file)
- + register CT ct;
- + char **file;
- + {
- + int fd;
- + char *id;
- + register struct exbody *e = (struct exbody *) ct -> c_ctextern;
- + register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
- +
- + switch (openExternal (e -> eb_parent, ce, file, &fd)) {
- + case NOTOK:
- + return NOTOK;
- +
- + case OK:
- + break;
- +
- + case DONE:
- + return fd;
- + }
- +
- + if (!e -> eb_name) {
- + content_error (NULLCP, ct, "missing name parameter");
- + return NOTOK;
- + }
- +
- + ce -> ce_unlink = 0;
- + if ((ce -> ce_fp = fopen (ce -> ce_file = getcpy (e -> eb_name), "r"))
- + == NULL) {
- + content_error (ce -> ce_file, ct, "unable to fopen for reading");
- + return NOTOK;
- + }
- +
- + if (cache
- + && (id = e -> eb_parent -> c_id)
- + && (!e -> eb_permission
- + || !uleq (e -> eb_permission, "read-write"))) {
- + char buffer[BUFSIZ];
- +
- + (void) sprintf (buffer, "Make cached, publically-accessible copy of %s? ",
- + e -> eb_name);
- + if (getanswer (buffer)) {
- + int mask;
- + char cachefile[BUFSIZ];
- + FILE *fp;
- +
- + (void) sprintf (cachefile, "%s/%s", cache, id = trimcpy (id));
- + free (id);
- +
- + mask = umask (0022);
- + if (fp = fopen (cachefile, "w")) {
- + register FILE *gp = ce -> ce_fp;
- +
- + (void) fseek (gp, 0L, 0);
- +
- + while (fgets (buffer, sizeof buffer - 1, gp))
- + (void) fputs (buffer, fp);
- + (void) fflush (fp);
- +
- + if (ferror (gp)) {
- + admonish (ce -> ce_file, "error reading");
- + (void) unlink (cachefile);
- + }
- +
- + if (ferror (fp)) {
- + admonish (cachefile, "error writing");
- + (void) unlink (cachefile);
- + }
- + (void) fclose (fp);
- + }
- + (void) umask (mask);
- + }
- + }
- +
- + (void) fseek (ce -> ce_fp, 0L, 0);
- + *file = ce -> ce_file;
- + return fileno (ce -> ce_fp);
- + }
- +
- + /* FTP */
- +
- + static int openFTP (ct, file)
- + register CT ct;
- + char **file;
- + {
- + int caching,
- + fd;
- + char *ftp,
- + *id,
- + *user,
- + *pass,
- + buffer[BUFSIZ],
- + cachefile[BUFSIZ];
- + register struct exbody *e = (struct exbody *) ct -> c_ctextern;
- + register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
- + static char *username = NULL;
- + static char *password = NULL;
- +
- + (void) sprintf (buffer, "%s-access-ftp", invo_name);
- + if ((ftp = m_find (buffer)) && !*ftp)
- + ftp = NULLCP;
- + #ifndef FTP
- + if (!ftp)
- + return NOTOK;
- + #endif
- + switch (openExternal (e -> eb_parent, ce, file, &fd)) {
- + case NOTOK:
- + return NOTOK;
- +
- + case OK:
- + break;
- +
- + case DONE:
- + return fd;
- + }
- +
- + if (!e -> eb_name || !e -> eb_site) {
- + content_error (NULLCP, ct, "missing %s parameter",
- + e -> eb_name ? "site": "name");
- + return NOTOK;
- + }
- +
- + (void) sprintf (buffer,
- + e -> eb_size > 0
- + ? "Retrieve %s (content %s)\n using %sFTP from site %s (%lu octets)? "
- + : "Retrieve %s (content %s)\n using %sFTP from site %s? ",
- + e -> eb_name, e -> eb_partno,
- + e -> eb_flags ? "anonymous " : "",
- + e -> eb_site, e -> eb_size);
- + if (!getanswer (buffer))
- + return NOTOK;
- +
- + if (e -> eb_flags) {
- + user = "anonymous";
- + (void) sprintf (pass = buffer, "%s@%s", getusr (), LocalName ());
- + }
- + else {
- + ruserpass (e -> eb_site, &username, &password);
- + user = username, pass = password;
- + }
- +
- + ce -> ce_unlink = *file == NULL, caching = 0, cachefile[0] = 0;
- + if (cache
- + && (id = e -> eb_parent -> c_id)
- + && (!e -> eb_permission
- + || !uleq (e -> eb_permission, "read-write"))) {
- + (void) sprintf (buffer, "Make cached, publically-accessible copy? ");
- + if (getanswer (buffer)) {
- + (void) sprintf (cachefile, "%s/%s", cache, id = trimcpy (id));
- + free (id);
- +
- + if (*file == NULL) {
- + ce -> ce_unlink = 0;
- + caching = 1;
- + }
- + }
- + }
- +
- + if ((ce -> ce_fp = fopen (ce -> ce_file =
- + add (*file ? *file
- + : caching ? cachefile
- + : m_scratch ("", tmp),
- + NULLCP),
- + "w+")) == NULL) {
- + content_error (ce -> ce_file, ct,
- + "unable to fopen for writing and reading");
- + return NOTOK;
- + }
- +
- +
- + #ifdef FTP
- + if (ftp)
- + #endif
- + {
- + int child_id,
- + i,
- + vecp;
- + char *vec[9];
- +
- + vecp = 0;
- + vec[vecp++] = r1bindex (ftp, '/');
- + vec[vecp++] = e -> eb_site;
- + vec[vecp++] = user;
- + vec[vecp++] = pass;
- + vec[vecp++] = e -> eb_dir;
- + vec[vecp++] = e -> eb_name;
- + vec[vecp++] = ce -> ce_file,
- + vec[vecp++] = e -> eb_mode && uleq (e -> eb_mode, "ascii")
- + ? "ascii" : "binary";
- + vec[vecp] = NULL;
- +
- + (void) fflush (stdout);
- +
- + for (i = 0; (child_id = vfork ()) == NOTOK && i < 5; i++)
- + sleep (5);
- + switch (child_id) {
- + case NOTOK:
- + adios ("fork", "unable to");
- + /* NOTREACHED */
- +
- + case OK:
- + (void) close (fileno (ce -> ce_fp));
- + (void) execvp (ftp, vec);
- + fprintf (stderr, "unable to exec ");
- + perror (ftp);
- + _exit (-1);
- + /* NOTREACHED */
- +
- + default:
- + if (pidXwait (child_id, NULLCP)) {
- + #ifdef FTP
- + losing_ftp: ;
- + #endif
- + username = password = NULL;
- + ce -> ce_unlink = 1;
- + return NOTOK;
- + }
- + break;
- + }
- + }
- + #ifdef FTP
- + else
- + if (ftp_get (e -> eb_site, user, pass, e -> eb_dir, e -> eb_name,
- + ce -> ce_file,
- + e -> eb_mode && uleq (e -> eb_mode, "ascii"), 0)
- + == NOTOK)
- + goto losing_ftp;
- + #endif
- +
- + if (cachefile[0])
- + if (caching)
- + (void) chmod (cachefile, 0644);
- + else {
- + int mask;
- + register FILE *fp;
- +
- + mask = umask (0022);
- + if (fp = fopen (cachefile, "w")) {
- + register FILE *gp = ce -> ce_fp;
- +
- + (void) fseek (gp, 0L, 0);
- +
- + while (fgets (buffer, sizeof buffer - 1, gp))
- + (void) fputs (buffer, fp);
- + (void) fflush (fp);
- +
- + if (ferror (gp)) {
- + admonish (ce -> ce_file, "error reading");
- + (void) unlink (cachefile);
- + }
- +
- + if (ferror (fp)) {
- + admonish (cachefile, "error writing");
- + (void) unlink (cachefile);
- + }
- + (void) fclose (fp);
- + }
- + (void) umask (mask);
- + }
- +
- + (void) fseek (ce -> ce_fp, 0L, 0);
- + *file = ce -> ce_file;
- + return fileno (ce -> ce_fp);
- + }
- +
- + /* Mail */
- +
- + static int openMail (ct, file)
- + register CT ct;
- + char **file;
- + {
- + int child_id,
- + fd,
- + i,
- + result,
- + vecp;
- + char *bp,
- + *id,
- + buffer[BUFSIZ],
- + *vec[7];
- + register struct exbody *e = (struct exbody *) ct -> c_ctextern;
- + register struct cefile *ce = (struct cefile *) ct -> c_ceparams;
- +
- + switch (openExternal (e -> eb_parent, ce, file, &fd)) {
- + case NOTOK:
- + return NOTOK;
- +
- + case OK:
- + break;
- +
- + case DONE:
- + return fd;
- + }
- +
- + if (!e -> eb_server) {
- + content_error (NULLCP, ct, "missing server parameter");
- + return NOTOK;
- + }
- +
- + bp = concat ("Retrieve content ", e -> eb_partno, " by asking mailbox ",
- + e -> eb_server, "\n\n", e -> eb_body, "\n? ", NULLCP);
- + result = getanswer (bp);
- + free (bp);
- +
- + if (!result)
- + return NOTOK;
- +
- + vecp = 0;
- + vec[vecp++] = r1bindex (mailproc, '/');
- + vec[vecp++] = e -> eb_server;
- + vec[vecp++] = "-subject";
- + if (cache
- + && (id = e -> eb_parent -> c_id)
- + && (!e -> eb_permission
- + || !uleq (e -> eb_permission, "read-write"))) {
- + (void) sprintf (buffer, "cache content as %s/%s", cache,
- + id = trimcpy (id));
- + free (id);
- +
- + vec[vecp++] = buffer;
- + }
- + else
- + vec[vecp++] = "mail-server request";
- + vec[vecp++] = "-body";
- + vec[vecp++] = e -> eb_body;
- + vec[vecp] = NULL;
- +
- + for (i = 0; (child_id = vfork ()) == NOTOK && i < 5; i++)
- + sleep (5);
- + switch (child_id) {
- + case NOTOK:
- + advise ("fork", "unable to");
- + return NOTOK;
- +
- + case OK:
- + (void) execvp (mailproc, vec);
- + fprintf (stderr, "unable to exec ");
- + perror (mailproc);
- + _exit (-1);
- + /* NOTREACHED */
- +
- + default:
- + if (pidXwait (child_id, NULLCP) == OK)
- + advise (NULLCP, "request sent");
- + break;
- + }
- +
- + ce -> ce_unlink = *file == NULL;
- + if ((ce -> ce_fp = fopen (ce -> ce_file =
- + add (*file ? *file : m_scratch ("", tmp),
- + NULLCP),
- + "w+")) == NULL) {
- + content_error (ce -> ce_file, ct,
- + "unable to fopen for writing and reading");
- + return NOTOK;
- + }
- + if (ct -> c_showproc)
- + free (ct -> c_showproc);
- + ct -> c_showproc = add ("true", NULLCP);
- +
- + (void) fseek (ce -> ce_fp, 0L, 0);
- + *file = ce -> ce_file;
- + return fileno (ce -> ce_fp);
- + }
- +
- + /* COMPOSITION */
- +
- + static char prefix[] = "----- =_aaaaaaaaaa";
- +
- + static char *free_file = NULL;
- + static CT free_ct = NULL;
- +
- +
- + static void build_comp (file)
- + char *file;
- + {
- + int compnum,
- + state;
- + char *cp,
- + buf[BUFSIZ],
- + name[NAMESZ],
- + tmpfil[BUFSIZ];
- + struct multipart *m;
- + register struct part **pp;
- + CT ct;
- + FILE *in,
- + *out;
- +
- + if ((in = fopen (file, "r")) == NULL)
- + adios (file, "unable to open for reading");
- +
- + (void) umask (~m_gmprot ());
- +
- + (void) strcpy (tmpfil, m_scratch (file, invo_name));
- + if ((out = fopen (tmpfil, "w")) == NULL)
- + adios (tmpfil, "unable to open for writing");
- + free_file = tmpfil;
- +
- + for (compnum = 1, state = FLD;;) {
- + switch (state = m_getfld (state, name, buf, sizeof buf, in)) {
- + case FLD:
- + case FLDPLUS:
- + case FLDEOF:
- + compnum++;
- +
- + if (uleq (name, VRSN_FIELD))
- + adios (NULLCP, "draft shouldn't contain %s: field",
- + VRSN_FIELD);
- +
- + if (uleq (name, TYPE_FIELD)) {
- + while (state == FLDPLUS)
- + state = m_getfld (state, name, buf, sizeof buf, in);
- + goto finish_field;
- + }
- +
- + if (uleq (name, ENCODING_FIELD))
- + adios (NULLCP, "draft shouldn't contain %s: field",
- + ENCODING_FIELD);
- +
- + fprintf (out, "%s:%s", name, buf);
- + while (state == FLDPLUS) {
- + state = m_getfld (state, name, buf, sizeof buf, in);
- + (void) fputs (buf, out);
- + }
- + finish_field: ;
- + if (state != FLDEOF)
- + continue;
- + /* else fall... */
- +
- + case FILEEOF:
- + adios (NULLCP, "draft has empty body -- no directives!");
- + /* NOTREACHED */
- +
- + case BODY:
- + case BODYEOF:
- + (void) fseek (in, (long) (-strlen (buf)), 1);
- + break;
- +
- + case LENERR:
- + case FMTERR:
- + adios (NULLCP, "message format error in component #%d",
- + compnum);
- +
- + default:
- + adios (NULLCP, "getfld() returned %d", state);
- + }
- + break;
- + }
- +
- + if ((free_ct = ct = (CT) calloc (1, sizeof *ct)) == NULL)
- + adios (NULLCP, "out of memory");
- + if (get_ctinfo ("multipart/mixed", ct, 0) == NOTOK)
- + done (1);
- + ct -> c_type = CT_MULTIPART;
- + ct -> c_subtype = MULTI_MIXED;
- + ct -> c_ctlistfnx = list_multi;
- + ct -> c_ctfreefnx = free_multi;
- + ct -> c_file = add (file, NULLCP);
- +
- + if ((m = (struct multipart *) calloc (1, sizeof *m)) == NULL)
- + adios (NULLCP, "out of memory");
- + ct -> c_ctparams = (caddr_t) m;
- +
- + pp = &m -> mp_parts;
- + while (fgetstr (buf, sizeof buf - 1, in)) {
- + register struct part *part;
- + CT p;
- +
- + if (user_content (in, file, buf, &p) == DONE) {
- + admonish (NULLCP, "ignoring spurious #end");
- + continue;
- + }
- + if (!p)
- + continue;
- +
- + if ((part = (struct part *) calloc (1, sizeof *part)) == NULL)
- + adios (NULLCP, "out of memory");
- + *pp = part, pp = &part -> mp_next;
- + part -> mp_part = p;
- + }
- +
- + (void) fclose (in);
- +
- + if (!m -> mp_parts)
- + adios (NULLCP, "no content directives found");
- + if (!m -> mp_parts -> mp_next) {
- + CT p = m -> mp_parts -> mp_part;
- +
- + m -> mp_parts -> mp_part = NULL;
- + free_content (ct);
- + free_ct = ct = p;
- + }
- +
- + if ((cp = index (prefix, 'a')) == NULL)
- + adios (NULLCP, "internal error(4)");
- +
- + while (compose_content (ct) == NOTOK)
- + if (*cp < 'z')
- + (*cp)++;
- + else
- + if (*++cp == 0)
- + adios (NULLCP,
- + "giving up trying to find a unique delimiter string");
- + else
- + (*cp)++;
- +
- + fprintf (out, "%s: %s\n", VRSN_FIELD, VRSN_VALUE);
- + (void) output_content (ct, out);
- +
- + if (fflush (out))
- + adios (tmpfil, "error writing to");
- +
- + (void) fclose (out);
- +
- + if (listsw && ct -> c_ctlistfnx) {
- + char *savfile;
- +
- + if (headsw)
- + printf (LSTFMT1, "msg", "part", "type/subtype", "size",
- + "description");
- +
- + /* to get msgno */
- + savfile = ct -> c_file, ct -> c_file = file;
- + (*ct -> c_ctlistfnx) (ct, 1);
- + ct -> c_file = savfile;
- + }
- +
- + free_content (ct);
- + free_ct = NULL;
- +
- + (void) sprintf (buf, "%s.orig", m_backup (file));
- + if (rename (file, buf) == NOTOK)
- + adios (buf, "unable to rename %s to", file);
- + if (rename (tmpfil, file) == NOTOK) {
- + advise (file, "unable to rename %s to", tmpfil);
- + (void) rename (buf, file);
- + done (1);
- + }
- + free_file = NULL;
- +
- + done (0);
- + }
- +
- + /* */
- +
- + static char *fgetstr (s, n, stream)
- + char *s;
- + int n;
- + FILE *stream;
- + {
- + register char *cp,
- + *ep;
- +
- + for (ep = (cp = s) + n; cp < ep; ) {
- + register int i;
- +
- + if (!fgets (cp, n, stream))
- + return (cp != s ? s : NULL);
- + if (cp == s && *cp != '#')
- + return s;
- +
- + cp += (i = strlen (cp)) - 1;
- + if (i <= 1 || *cp-- != '\n' || *cp != '\\')
- + break;
- + *cp = 0, n -= (i - 2);
- + }
- +
- + return s;
- + }
- +
- + /* */
- +
- + static int user_content (in, file, buf, ctp)
- + FILE *in;
- + char *file,
- + *buf;
- + CT *ctp;
- + {
- + int extrnal,
- + vrsn;
- + register char *cp,
- + **ap;
- + char buffer[BUFSIZ];
- + struct multipart *m;
- + register struct part **pp;
- + struct stat st;
- + register struct str2init *s2i;
- + register CI ci;
- + register CT ct;
- +
- + if (buf[0] == '\n' || strcmp (buf, "#\n") == 0) {
- + *ctp = NULL;
- + return OK;
- + }
- +
- + if ((ct = (CT) calloc (1, sizeof *ct)) == NULL)
- + adios (NULLCP, "out of memory");
- + *ctp = ct;
- + ci = &ct -> c_ctinfo;
- + ct -> c_ctlistfnx = list_content;
- +
- + if (buf[0] != '#' || buf[1] == '#' || buf[1] == '<') {
- + int headers,
- + inlineD;
- + long pos;
- + char content[BUFSIZ];
- + FILE *out;
- +
- + ct -> c_file = add (m_tmpfil (invo_name), NULLCP);
- + ct -> c_unlink = 1;
- +
- + if ((out = fopen (ct -> c_file, "w")) == NULL)
- + adios (ct -> c_file, "unable to open for writing");
- +
- + if (buf[0] == '#' && buf[1] == '<') {
- + (void) strcpy (content, buf + 2);
- + inlineD = 1;
- + goto rock_and_roll;
- + }
- + else
- + inlineD = 0;
- +
- + (void) strcpy (content, "text/plain");
- + headers = 0;
- + (void) strcpy (buffer, buf[0] != '#' ? buf : buf + 1);
- + for (;;) {
- + int i;
- +
- + if (headers >= 0
- + && uprf (buffer, DESCR_FIELD)
- + && buffer[i = strlen (DESCR_FIELD)] == ':') {
- + headers = 1;
- +
- + again_descr: ;
- + ct -> c_descr = add (buffer + i + 1, ct -> c_descr);
- + if (!fgetstr (buffer, sizeof buffer - 1, in))
- + adios (NULLCP,
- + "end-of-file after %s: field in plaintext",
- + DESCR_FIELD);
- + switch (buffer[0]) {
- + case ' ':
- + case '\t':
- + i = -1;
- + goto again_descr;
- +
- + case '#':
- + adios (NULLCP,
- + "#-directive after %s: field in plaintext",
- + DESCR_FIELD);
- + /* NOTREACHED */
- +
- + default:
- + break;
- + }
- + }
- +
- + if (headers != 1 || buffer[0] != '\n')
- + (void) fputs (buffer, out);
- + rock_and_roll: ;
- + headers = -1;
- +
- + pos = ftell (in);
- + if ((cp = fgetstr (buffer, sizeof buffer - 1, in)) == NULL)
- + break;
- + if (buffer[0] == '#') {
- + register char *bp;
- +
- + if (buffer[1] != '#')
- + break;
- + for (cp = (bp = buffer) + 1; *cp; cp++)
- + *bp++ = *cp;
- + *bp = '\0';
- + }
- + }
- +
- + if (listsw)
- + ct -> c_end = ftell (out);
- + (void) fclose (out);
- +
- + if (get_ctinfo (content, ct, inlineD) == NOTOK)
- + done (1);
- + for (s2i = str2cts; s2i -> si_key; s2i++)
- + if (uleq (ci -> ci_type, s2i -> si_key))
- + break;
- + if (!s2i -> si_key && !uprf (ci -> ci_type, "X-"))
- + s2i++;
- + switch (ct -> c_type = s2i -> si_value) {
- + case CT_MESSAGE:
- + case CT_MULTIPART:
- + adios (NULLCP,
- + "it makes sense to define a in-line %s content... NOT!",
- + ct -> c_type == CT_MESSAGE ? "message" : "multipart");
- + /* NOTREACHED */
- +
- + default:
- + if (ct -> c_ctinitfnx = s2i -> si_init)
- + (void) (*ct -> c_ctinitfnx) (ct);
- + break;
- + }
- +
- + if (cp)
- + (void) fseek (in, pos, 0);
- + return OK;
- + }
- +
- + extrnal = buf[1] == '@';
- + if (get_ctinfo (buf + (extrnal ? 2 : 1), ct, 1) == NOTOK)
- + done (1);
- +
- + for (s2i = str2cts; s2i -> si_key; s2i++)
- + if (uleq (ci -> ci_type, s2i -> si_key))
- + break;
- + if (s2i -> si_key) { /* type/subtype [file] */
- + if (!ci -> ci_subtype)
- + adios (NULLCP, "missing subtype in \"#%s\"", ci -> ci_type);
- +
- + switch (ct -> c_type = s2i -> si_value) {
- + case CT_MULTIPART:
- + adios (NULLCP, "use \"#begin ... #end\" instead of \"#%s/%s\"",
- + ci -> ci_type, ci -> ci_subtype);
- + /* NOTREACHED */
- +
- + case CT_MESSAGE:
- + if (uleq (ci -> ci_subtype, "partial"))
- + adios (NULLCP, "sorry, \"#%s/%s\" isn't supported",
- + ci -> ci_type, ci -> ci_subtype);
- + if (uleq (ci -> ci_subtype, "external-body"))
- + adios (NULLCP, "use \"#@type/subtype ... [] ...\" instead of \"#%s/%s\"",
- + ci -> ci_type, ci -> ci_subtype);
- + adios (NULLCP,
- + "use \"#forw [+folder] [msgs]\" instead of \"#%s/%s\"",
- + ci -> ci_type, ci -> ci_subtype);
- + /* NOTREACHED */
- +
- + default:
- + if (ct -> c_ctinitfnx = s2i -> si_init)
- + (void) (*ct -> c_ctinitfnx) (ct);
- + break;
- + }
- +
- + if (extrnal) {
- + char msgid[BUFSIZ];
- + register struct exbody *e;
- + CT p;
- + static int partno;
- + static long clock = 0L;
- + static char *msgfmt;
- +
- + if (!ci -> ci_magic)
- + adios (NULLCP, "need external information for \"#@%s/%s\"",
- + ci -> ci_type, ci -> ci_subtype);
- + p = ct;
- +
- + (void) sprintf (buffer, "message/external-body; %s",
- + ci -> ci_magic);
- + free (ci -> ci_magic), ci -> ci_magic = NULL;
- +
- + if ((ct = (CT) calloc (1, sizeof *ct)) == NULL)
- + adios (NULLCP, "out of memory");
- + *ctp = ct;
- + ci = &ct -> c_ctinfo;
- + ct -> c_ctlistfnx = list_content;
- + if (get_ctinfo (buffer, ct, 0) == NOTOK)
- + done (1);
- + ct -> c_type = CT_MESSAGE;
- + ct -> c_subtype = MESSAGE_EXTERNAL;
- +
- + if ((e = (struct exbody *) calloc (1, sizeof *e)) == NULL)
- + adios (NULLCP, "out of memory");
- + ct -> c_ctparams = (caddr_t) e;
- + ct -> c_ctfreefnx = free_external;
- +
- + e -> eb_parent = ct;
- + e -> eb_content = p;
- + p -> c_ctextern = (caddr_t) e;
- +
- + ct -> c_ctlistfnx = list_external;
- +
- + if (params_external (ct, 1) == NOTOK)
- + done (1);
- +
- + if (clock == 0L) {
- + (void) time (&clock);
- + (void) sprintf (msgid, "<%d.%ld.%%d@%s>\n", getpid (), clock,
- + LocalName ());
- + partno = 0;
- + msgfmt = getcpy (msgid);
- + }
- +
- + (void) sprintf (msgid, msgfmt, ++partno);
- + ct -> c_id = getcpy (msgid);
- +
- + return OK;
- + }
- +
- + if (ci -> ci_magic) {
- + if (*ci -> ci_magic == '|' || *ci -> ci_magic == '!') {
- + for (cp = ci -> ci_magic + 1; isspace (*cp); cp++)
- + continue;
- + if (!*cp)
- + adios (NULLCP, "empty pipe command for #%s directive",
- + ci -> ci_type);
- + cp = add (cp, NULLCP);
- + free (ci -> ci_magic);
- + ci -> ci_magic = cp;
- + }
- + else {
- + if (access (ct -> c_file = ci -> ci_magic, 04) == NOTOK)
- + adios ("reading", "unable to access %s for", ct -> c_file);
- + if (listsw && stat (ct -> c_file, &st) != NOTOK)
- + ct -> c_end = st.st_size;
- + ci -> ci_magic = NULL;
- + }
- + return OK;
- + }
- +
- + (void) sprintf (buffer, "%s-compose-%s/%s", invo_name, ci -> ci_type,
- + ci -> ci_subtype);
- + if ((cp = m_find (buffer)) == NULL || *cp == 0) {
- + (void) sprintf (buffer, "%s-compose-%s", invo_name, ci -> ci_type);
- + if ((cp = m_find (buffer)) == NULL || *cp == 0) {
- + content_error (NULLCP, ct,
- + "don't know how to compose content");
- + done (1);
- + }
- + }
- + ci -> ci_magic = add (cp, NULLCP);
- + return OK;
- + }
- +
- + if (extrnal)
- + adios (NULLCP, "externally definition not allowed for \"#%s\"",
- + ci -> ci_type);
- +
- + if (uleq (ci -> ci_type, "forw")) { /* #forw [+folder] [msgs] */
- + int msgnum;
- + char *folder,
- + *arguments[MAXARGS];
- + struct msgs *mp;
- +
- + if (ci -> ci_magic) {
- + ap = brkstring (ci -> ci_magic, " ", "\n");
- + ap = copyip (ap, arguments);
- + }
- + else
- + arguments[0] = "cur", arguments[1] = NULL;
- +
- + folder = NULL;
- + for (ap = arguments; cp = *ap; ap++)
- + if (*cp == '+' || *cp == '@')
- + if (folder)
- + adios (NULLCP, "only one folder per #forw directive");
- + else
- + folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
- + if (!folder)
- + folder = add (m_getfolder (), NULLCP);
- +
- + if ((mp = m_gmsg (folder)) == NULL)
- + adios (NULLCP, "unable to read folder %s", folder);
- + for (ap = arguments; cp = *ap; ap++)
- + if (*cp != '+' && *cp != '@')
- + if (!m_convert (mp, cp))
- + done (1);
- + free (folder);
- +
- + free_ctinfo (ct);
- + if (get_ctinfo ("multipart/digest", ct, 0) == NOTOK)
- + done (1);
- + ct -> c_type = CT_MULTIPART;
- + ct -> c_subtype = MULTI_DIGEST;
- + ct -> c_ctlistfnx = list_multi;
- + ct -> c_ctfreefnx = free_multi;
- +
- + if ((m = (struct multipart *) calloc (1, sizeof *m)) == NULL)
- + adios (NULLCP, "out of memory");
- + ct -> c_ctparams = (caddr_t) m;
- +
- + pp = &m -> mp_parts;
- + for (msgnum = mp -> lowsel; msgnum <= mp -> hghsel; msgnum++)
- + if (mp -> msgstats[msgnum] & SELECTED) {
- + register struct part *part;
- + register CT p;
- +
- + if ((p = (CT) calloc (1, sizeof *p)) == NULL)
- + adios (NULLCP, "out of memory");
- + if (get_ctinfo ("message/rfc822", p, 0) == NOTOK)
- + done (1);
- + p -> c_type = CT_MESSAGE;
- + p -> c_subtype = MESSAGE_RFC822;
- + p -> c_ctlistfnx = list_content;
- +
- + (void) sprintf (buffer, "%s/%d", mp -> foldpath, msgnum);
- + p -> c_file = add (buffer, NULLCP);
- + if (listsw && stat (p -> c_file, &st) != NOTOK)
- + p -> c_end = st.st_size;
- +
- + if ((part = (struct part *) calloc (1, sizeof *part)) == NULL)
- + adios (NULLCP, "out of memory");
- + *pp = part, pp = &part -> mp_next;
- + part -> mp_part = p;
- + }
- +
- + m_fmsg (mp);
- +
- + return OK;
- + }
- +
- + if (uleq (ci -> ci_type, "end")) {
- + free_content (ct);
- + *ctp = NULL;
- + return DONE;
- + }
- +
- + if (!uleq (ci -> ci_type, "begin"))
- + adios (NULLCP, "unknown directive \"#%s\"", ci -> ci_type);
- +
- + /* #begin [ alternative | parallel ] */
- + vrsn = !ci -> ci_magic ? MULTI_MIXED
- + : uprf (ci -> ci_magic, "alt") ? MULTI_ALTERNATE
- + : MULTI_PARALLEL;
- + free_ctinfo (ct);
- + (void) sprintf (buffer, "multipart/%s", SubMultiPart[vrsn - 1].kv_key);
- + if (get_ctinfo (buffer, ct, 0) == NOTOK)
- + done (1);
- + ct -> c_type = CT_MULTIPART;
- + ct -> c_subtype = vrsn;
- + ct -> c_ctlistfnx = list_multi;
- + ct -> c_ctfreefnx = free_multi;
- +
- + if ((m = (struct multipart *) calloc (1, sizeof *m)) == NULL)
- + adios (NULLCP, "out of memory");
- + ct -> c_ctparams = (caddr_t) m;
- +
- + pp = &m -> mp_parts;
- + while (fgetstr (buffer, sizeof buffer - 1, in)) {
- + register struct part *part;
- + CT p;
- +
- + if (user_content (in, file, buffer, &p) == DONE) {
- + if (!m -> mp_parts)
- + adios (NULLCP, "empty \"#begin ... #end\" sequence");
- + return OK;
- + }
- + if (!p)
- + continue;
- +
- + if ((part = (struct part *) calloc (1, sizeof *part)) == NULL)
- + adios (NULLCP, "out of memory");
- + *pp = part, pp = &part -> mp_next;
- + part -> mp_part = p;
- + }
- + admonish (NULLCP, "premature end-of-file, missing #end");
- + return OK;
- + }
- +
- + /* */
- +
- + static int compose_content (ct)
- + register CT ct;
- + {
- + register char *cp;
- + char buffer[BUFSIZ];
- + register CI ci = &ct -> c_ctinfo;
- +
- + if (ct -> c_type == CT_MESSAGE && ct -> c_subtype == MESSAGE_EXTERNAL)
- + return OK;
- +
- + switch (ct -> c_type) {
- + case CT_MULTIPART:
- + {
- + int partnum;
- + register char *pp;
- + char partnam[BUFSIZ];
- + struct multipart *m = (struct multipart *) ct -> c_ctparams;
- + register struct part *part;
- +
- + if (ct -> c_partno) {
- + (void) sprintf (partnam, "%s.", ct -> c_partno);
- + pp = partnam + strlen (partnam);
- + }
- + else
- + pp = partnam;
- +
- + for (part = m -> mp_parts, partnum = 1;
- + part;
- + part = part -> mp_next, partnum++) {
- + register CT p = part -> mp_part;
- +
- + (void) sprintf (pp, "%d", partnum);
- + p -> c_partno = add (partnam, NULLCP);
- +
- + if (compose_content (p) == NOTOK)
- + return NOTOK;
- + }
- +
- + if (rfc934sw && ct -> c_subtype == MULTI_DIGEST) {
- + int is934 = 1;
- +
- + for (part = m -> mp_parts; part; part = part -> mp_next) {
- + register CT p = part -> mp_part;
- +
- + if (p -> c_subtype != MESSAGE_RFC822) {
- + is934 = 0;
- + break;
- + }
- + }
- +
- + ct -> c_rfc934 = is934;
- + for (part = m -> mp_parts; part; part = part -> mp_next) {
- + register CT p = part -> mp_part;
- +
- + if (p -> c_rfc934 = is934)
- + p -> c_end++;
- + }
- + }
- +
- + if (listsw) {
- + ct -> c_end = (partnum = strlen (prefix) + 2) + 2;
- + if (ct -> c_rfc934)
- + ct -> c_end += 1;
- +
- + for (part = m -> mp_parts; part; part = part -> mp_next)
- + ct -> c_end += part -> mp_part -> c_end + partnum;
- + }
- + }
- + break;
- +
- +
- + default:
- + if (!ct -> c_file) {
- + int child_id,
- + i,
- + xstdout;
- + register char *bp,
- + **ap;
- + char *vec[4];
- + FILE *out;
- +
- + if (!(cp = ci -> ci_magic))
- + adios (NULLCP, "internal error(5)");
- +
- + ct -> c_file = add (m_tmpfil (invo_name), NULLCP);
- + ct -> c_unlink = 1;
- +
- + xstdout = 0;
- + buffer[0] = '\0';
- + for (bp = buffer; *cp; cp++)
- + if (*cp == '%') {
- + switch (*++cp) {
- + case 'a': /* additional arguments */
- + {
- + register char **ep;
- + char *s = "";
- +
- + for (ap = ci -> ci_attrs, ep = ci -> ci_values;
- + *ap;
- + ap++, ep++) {
- + (void) sprintf (bp, "%s%s=\"%s\"", s,
- + *ap, *ep);
- + bp += strlen (bp);
- + s = " ";
- + }
- + }
- + break;
- +
- + case 'F': /* %f, and stdout is not-redirected */
- + xstdout = 1;
- + /* and fall... */
- + case 'f': /* filename */
- + (void) sprintf (bp, "%s", ct -> c_file);
- + break;
- +
- + case 's': /* subtype */
- + (void) strcpy (bp, ci -> ci_subtype);
- + break;
- +
- + case '%':
- + goto raw;
- +
- + default:
- + *bp++ = *--cp;
- + *bp = '\0';
- + continue;
- + }
- + bp += strlen (bp);
- + }
- + else {
- + raw: ;
- + *bp++ = *cp;
- + *bp = '\0';
- + }
- +
- + printf ("composing content %s/%s from command\n\t%s\n",
- + ci -> ci_type, ci -> ci_subtype, buffer);
- + (void) fflush (stdout);
- +
- + vec[0] = "/bin/sh";
- + vec[1] = "-c";
- + vec[2] = buffer;
- + vec[3] = NULL;
- +
- + if ((out = fopen (ct -> c_file, "w")) == NULL)
- + adios (ct -> c_file, "unable to open for writing");
- +
- + for (i = 0; (child_id = vfork ()) == NOTOK && i > 5; i++)
- + sleep (5);
- + switch (child_id) {
- + case NOTOK:
- + adios ("fork", "unable to fork");
- + /* NOTREACHED */
- +
- + case OK:
- + if (!xstdout)
- + (void) dup2 (fileno (out), 1);
- + (void) close (fileno (out));
- + (void) execvp ("/bin/sh", vec);
- + fprintf (stderr, "unable to exec ");
- + perror ("/bin/sh");
- + _exit (-1);
- + /* NOTREACHED */
- +
- + default:
- + (void) fclose (out);
- + if (pidXwait (child_id, NULLCP))
- + done (1);
- + break;
- + }
- + }
- + if (listsw && ct -> c_end == 0L) {
- + struct stat st;
- +
- + if (stat (ct -> c_file, &st) != NOTOK)
- + ct -> c_end = st.st_size;
- + }
- + if (ct -> c_type != CT_TEXT
- + && !(ct -> c_type == CT_APPLICATION
- + && ct -> c_subtype == APPLICATION_POSTSCRIPT))
- + break;
- + /* else fall... */
- +
- + case CT_MESSAGE:
- + {
- + int charset,
- + len,
- + linelen,
- + result;
- + FILE *in;
- +
- + if ((in = fopen (ct -> c_file, "r")) == NULL)
- + adios (ct -> c_file, "unable to open for reading");
- +
- + len = strlen (prefix);
- + result = OK;
- + switch (ct -> c_type) {
- + case CT_TEXT:
- + charset = ct -> c_ctparams ? 0 : -1;
- + linelen = 0;
- + break;
- +
- + case CT_APPLICATION:
- + charset = linelen = ct -> c_encoding ? 0 : -1;
- + break;
- +
- + default:
- + charset = linelen = 0;
- + break;
- + }
- + while (fgets (buffer, sizeof buffer - 1, in)) {
- + if (charset == -1) {
- + for (cp = buffer; *cp; cp++)
- + if (!isascii (*cp)) {
- + charset = CHARSET_UNKNOWN;
- + break;
- + }
- + if ((linelen == -1) && (cp - buffer > CPERLIN + 1))
- + linelen = 1;
- + if (result == NOTOK)
- + break;
- + }
- + else
- + if ((linelen == -1) && (strlen (buffer) > CPERLIN + 1))
- + linelen = 1;
- + if (result == NOTOK)
- + continue;
- +
- + if (buffer[0] == '-' && buffer[1] == '-') {
- + for (cp = buffer + strlen (buffer) - 1;
- + cp >= buffer;
- + cp--)
- + if (!isspace (*cp))
- + break;
- + *++cp = '\0';
- + if (strncmp (buffer + 2, prefix, len) == 0
- + && isdigit (buffer[2 + len])) {
- + result = NOTOK;
- + if (charset != -1 && linelen != -1)
- + break;
- + }
- + }
- + }
- + if (ct -> c_type == CT_APPLICATION && !ct -> c_encoding)
- + ct -> c_encoding = linelen == -1
- + && charset != CHARSET_UNKNOWN
- + ? CE_7BIT : CE_QUOTED;
- + if (ct -> c_type == CT_TEXT && !ct -> c_ctparams) {
- + register char **ap,
- + **ep;
- + register struct text *t;
- +
- + if (charset == CHARSET_UNKNOWN && mm_charset)
- + charset = -2;
- + else
- + if (charset == -1)
- + charset = CHARSET_USASCII;
- +
- + if ((t = (struct text *) calloc (1, sizeof *t)) == NULL)
- + adios (NULLCP, "out of memory");
- + ct -> c_ctparams = (caddr_t) t;
- + for (ap = ci -> ci_attrs, ep = ci -> ci_values;
- + *ap;
- + ap++, ep++)
- + continue;
- + switch (t -> tx_charset = charset) {
- + case CHARSET_USASCII:
- + *ap = add ("charset=us-ascii", NULLCP);
- + break;
- +
- + case CHARSET_UNKNOWN:
- + default:
- + *ap = add ("charset=x-unknown", NULLCP);
- + break;
- +
- + case -2:
- + *ap = concat ("charset=", mm_charset, NULLCP);
- + break;
- + }
- + cp = index (*ap++, '=');
- + *ap = NULL;
- + *cp++ = '\0';
- + *ep = cp;
- + }
- +
- + (void) fclose (in);
- +
- + return result;
- + }
- + }
- +
- + return OK;
- + }
- +
- + /* */
- +
- + static int output_content (ct, out)
- + register CT ct;
- + FILE *out;
- + {
- + int cc,
- + mailbody,
- + len;
- + register char **ap,
- + **ep;
- + char buffer[BUFSIZ];
- + register CI ci = &ct -> c_ctinfo;
- +
- + if (ct -> c_type == CT_MULTIPART) {
- + register char *cp;
- + static int encl = 0;
- +
- + ap = ci -> ci_attrs, ep = ci -> ci_values;
- +
- + (void) sprintf (buffer, "boundary=%s%d", prefix, encl++);
- + cp = index (*ap++ = add (buffer, NULLCP), '=');
- + *ap = NULL;
- + *cp++ = '\0';
- + *ep = cp;
- + }
- + else
- + if (ct -> c_type == CT_MESSAGE && ct -> c_rfc934)
- + goto rfc934_mode;
- +
- + len = 0;
- + fprintf (out, "%s: %s/%s", TYPE_FIELD, ci -> ci_type, ci -> ci_subtype);
- + len += strlen (TYPE_FIELD) + 2 + strlen (ci -> ci_type)
- + + 1 + strlen (ci -> ci_subtype);
- + mailbody = ct -> c_type == CT_MESSAGE
- + && ct -> c_subtype == MESSAGE_EXTERNAL
- + && ((struct exbody *) ct -> c_ctparams) -> eb_body;
- + for (ap = ci -> ci_attrs, ep = ci -> ci_values; *ap; ap++, ep++) {
- + if (mailbody && uleq (*ap, "body"))
- + continue;
- +
- + (void) putc (';', out);
- + len++;
- +
- + (void) sprintf (buffer, "%s=\"%s\"", *ap, *ep);
- +
- + if (len + 1 + (cc = strlen (buffer)) >= CPERLIN) {
- + (void) fputs ("\n\t", out);
- + len = 8;
- + }
- + else {
- + (void) putc (' ', out);
- + len++;
- + }
- + fprintf (out, "%s", buffer);
- + len += cc;
- + }
- + if (ci -> ci_comment) {
- + if (len + 1 + (cc = 2 + strlen (ci -> ci_comment)) >= CPERLIN) {
- + (void) fputs ("\n\t", out);
- + len = 8;
- + }
- + else {
- + (void) putc (' ', out);
- + len++;
- + }
- + fprintf (out, "(%s)", ci -> ci_comment);
- + len += cc;
- + }
- + fprintf (out, "\n");
- + if (ct -> c_id)
- + fprintf (out, "%s: %s", ID_FIELD, ct -> c_id);
- + if (ct -> c_descr)
- + fprintf (out, "%s: %s", DESCR_FIELD, ct -> c_descr);
- +
- + rfc934_mode: ;
- + if (ct -> c_ctextern)
- + return OK;
- + switch (ct -> c_type) {
- + case CT_MULTIPART:
- + {
- + struct multipart *m = (struct multipart *) ct -> c_ctparams;
- + register struct part *part;
- +
- + if (ct -> c_rfc934)
- + fprintf (out, "\n");
- +
- + for (part = m -> mp_parts; part; part = part -> mp_next) {
- + register CT p = part -> mp_part;
- +
- + fprintf (out, "\n--%s\n", ci -> ci_values[0]);
- + if (p -> c_type == CT_MESSAGE
- + && p -> c_subtype != MESSAGE_EXTERNAL
- + && !p -> c_rfc934)
- + fprintf (out, "%s: %s\n", VRSN_FIELD, VRSN_VALUE);
- + (void) output_content (p, out);
- + }
- +
- + fprintf (out, "\n--%s--\n", ci -> ci_values[0]);
- + }
- + break;
- +
- + case CT_TEXT:
- + if (ct -> c_subtype != TEXT_PLAIN
- + || (ct -> c_ctparams
- + && ((struct text *) ct -> c_ctparams) -> tx_charset
- + != CHARSET_USASCII)) {
- + quoted_printable: ;
- + fprintf (out, "%s: %s\n\n", ENCODING_FIELD,
- + "quoted-printable");
- + (void) writeQuoted (ct, out);
- + break;
- + }
- + /* else fall... */
- +
- + case CT_MESSAGE:
- + seven_bit: ;
- + fprintf (out, "\n");
- + if (ct -> c_type == CT_MESSAGE
- + && ct -> c_subtype == MESSAGE_EXTERNAL) {
- + register struct exbody *e = (struct exbody *) ct -> c_ctparams;
- +
- + (void) output_content (e -> eb_content, out);
- + if (e -> eb_body)
- + fprintf (out, "\n%s\n", e -> eb_body);
- + }
- + else
- + (void) write7Bit (ct, out);
- + break;
- +
- + case CT_APPLICATION:
- + if (ct -> c_subtype == APPLICATION_POSTSCRIPT) {
- + if (ct -> c_encoding == CE_7BIT)
- + goto seven_bit;
- + goto quoted_printable;
- + }
- + /* else fall... */
- +
- + default:
- + fprintf (out, "%s: %s\n\n", ENCODING_FIELD, "base64");
- + (void) writeBase64 (ct, out);
- + break;
- + }
- +
- + return OK;
- + }
- +
- + /* */
- +
- + static int write7Bit (ct, out)
- + register CT ct;
- + FILE *out;
- + {
- + char c,
- + buffer[BUFSIZ];
- + FILE *in;
- +
- + if ((in = fopen (ct -> c_file, "r")) == NULL)
- + adios (ct -> c_file, "unable to open for reading");
- +
- + c = '\n';
- + while (fgets (buffer, sizeof buffer - 1, in)) {
- + c = buffer[strlen (buffer) - 1];
- + (void) fputs (buffer, out);
- + }
- + if (c != '\n')
- + (void) putc ('\n', out);
- +
- + (void) fclose (in);
- +
- + return OK;
- + }
- +
- + /* */
- +
- + static int writeQuoted (ct, out)
- + register CT ct;
- + FILE *out;
- + {
- + register char *cp;
- + char c,
- + buffer[BUFSIZ];
- + FILE *in;
- +
- + if ((in = fopen (ct -> c_file, "r")) == NULL)
- + adios (ct -> c_file, "unable to open for reading");
- +
- + while (fgets (buffer, sizeof buffer - 1, in)) {
- + register int n;
- +
- + cp = buffer + strlen (buffer) - 1;
- + if ((c = *cp) == '\n')
- + *cp = '\0';
- +
- + if (strncmp (cp = buffer, "From ", sizeof "From " - 1) == 0) {
- + (void) fprintf (out, "=%02X", *cp++ & 0xff);
- + n = 3;
- + }
- + else
- + n = 0;
- + for (; *cp; cp++) {
- + if (n > CPERLIN - 3) {
- + (void) fputs ("=\n", out);
- + n = 0;
- + }
- +
- + switch (*cp) {
- + case ' ':
- + case '\t':
- + (void) putc (*cp, out);
- + n++;
- + break;
- +
- + case '@':
- + case '`':
- + if (ebcdicsw)
- + goto three_print;
- + one_print: ;
- + (void) putc (*cp, out);
- + n++;
- + break;
- +
- + default:
- + if (('!' <= *cp && *cp <= '$')
- + || ('[' <= *cp && *cp <= '^')
- + || ('{' <= *cp && *cp <= '~')) {
- + if (ebcdicsw)
- + goto three_print;
- + goto one_print;
- + }
- +
- + if ('%' <= *cp && *cp <= 'z')
- + goto one_print;
- + /* else fall... */
- + case '=':
- + three_print: ;
- + (void) fprintf (out, "=%02X", *cp & 0xff);
- + n += 3;
- + break;
- + }
- + }
- +
- + if (c == '\n') {
- + if (cp > buffer && (*--cp == ' ' || *cp == '\t'))
- + (void) fputs ("=\n", out);
- +
- + (void) putc ('\n', out);
- + }
- + else
- + (void) fputs ("=\n", out);
- + }
- +
- + (void) fclose (in);
- +
- + return OK;
- + }
- +
- + /* */
- +
- + static char nib2b64[0x40f] =
- + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
- +
- +
- + static int writeBase64 (ct, out)
- + register CT ct;
- + FILE *out;
- + {
- + int result;
- + FILE *in;
- +
- + if ((in = fopen (ct -> c_file, "r")) == NULL)
- + adios (ct -> c_file, "unable to open for reading");
- +
- + result = writeBase64aux (in, out);
- +
- + (void) fclose (in);
- +
- + return result;
- + }
- +
- +
- + static int writeBase64aux (in, out)
- + FILE *in,
- + *out;
- + {
- + int cc,
- + n;
- + char inbuf[3];
- +
- + n = BPERLIN;
- + while ((cc = fread (inbuf, sizeof *inbuf, sizeof inbuf, in)) > 0) {
- + unsigned long bits;
- + register char *bp;
- + char outbuf[4];
- +
- + if (cc < sizeof inbuf) {
- + inbuf[2] = 0;
- + if (cc < sizeof inbuf - 1)
- + inbuf[1] = 0;
- + }
- + bits = (inbuf[0] & 0xff) << 16;
- + bits |= (inbuf[1] & 0xff) << 8;
- + bits |= inbuf[2] & 0xff;
- +
- + for (bp = outbuf + sizeof outbuf; bp > outbuf; bits >>= 6)
- + *--bp = nib2b64[bits & 0x3f];
- + if (cc < sizeof inbuf) {
- + outbuf[3] = '=';
- + if (cc < sizeof inbuf - 1)
- + outbuf[2] = '=';
- + }
- +
- + (void) fwrite (outbuf, sizeof *outbuf, sizeof outbuf, out);
- +
- + if (cc < sizeof inbuf) {
- + (void) putc ('\n', out);
- + return OK;
- + }
- +
- + if (--n <= 0) {
- + n = BPERLIN;
- + (void) putc ('\n', out);
- + }
- + }
- + if (n != BPERLIN)
- + (void) putc ('\n', out);
- +
- + return OK;
- + }
- +
- + /* VIAMAIL */
- +
- + #include "../zotnet/tws.h"
- +
- +
- + static int via_mail (mailsw, subjsw, parmsw, descsw, cmntsw, slowsw, fromsw)
- + char *mailsw,
- + *subjsw,
- + *parmsw,
- + *descsw,
- + *cmntsw,
- + *fromsw;
- + int slowsw;
- + {
- + int nlines,
- + nparts,
- + status;
- + long pos;
- + char tmpfil[BUFSIZ];
- + struct stat st;
- + FILE *fp;
- +
- + (void) umask (~m_gmprot ());
- +
- + (void) strcpy (tmpfil, m_tmpfil (invo_name));
- + if ((fp = fopen (tmpfil, "w+")) == NULL)
- + adios (tmpfil, "unable to open for writing");
- + (void) chmod (tmpfil, 0600);
- +
- + if (!index (mailsw, '@'))
- + mailsw = concat (mailsw, "@", LocalName (), NULLCP);
- + fprintf (fp, "To: %s\n", mailsw);
- + nlines = 1;
- + if (subjsw)
- + fprintf (fp, "Subject: %s\n", subjsw), nlines++;
- + if (fromsw) {
- + if (!index (fromsw, '@'))
- + fromsw = concat (fromsw, "@", LocalName (), NULLCP);
- + fprintf (fp, "From: %s\n", fromsw), nlines++;
- + }
- + fprintf (fp, "%s: %s\n", VRSN_FIELD, VRSN_VALUE), nlines++;
- + fprintf (fp, "%s: application/octet-stream", TYPE_FIELD);
- + if (parmsw)
- + fprintf (fp, "; %s", parmsw);
- + if (cmntsw)
- + fprintf (fp, "\n\t(%s)", cmntsw), nlines++;
- + if (descsw)
- + fprintf (fp, "\n%s: %s", DESCR_FIELD, descsw), nlines++;
- + fprintf (fp, "\n%s: %s\n\n", ENCODING_FIELD, "base64"), nlines += 2;
- + if (fflush (fp))
- + adios (tmpfil, "error writing to");
- +
- + pos = ftell (fp);
- + (void) writeBase64aux (stdin, fp);
- + if (fflush (fp))
- + adios (tmpfil, "error writing to");
- +
- + if (fstat (fileno (fp), &st) == NOTOK)
- + adios ("failed", "fstat of %s", tmpfil);
- + nlines += ((st.st_size - pos) + CPERLIN) / (CPERLIN + 1);
- + nparts = (nlines + (LPERMSG - 1)) / LPERMSG;
- +
- + if (nparts <= 1)
- + status = via_post (tmpfil);
- + else {
- + int partno;
- + long clock;
- + char buffer[BUFSIZ],
- + msgid[BUFSIZ];
- +
- + if (verbosw) {
- + printf ("sending binary image as %d partial messages\n", nparts);
- + (void) fflush (stdout);
- + }
- +
- + (void) time (&clock);
- + (void) sprintf (msgid, "<%d.%ld@%s>", getpid (), clock, LocalName ());
- +
- + (void) fseek (fp, 0L, 0);
- + if (!fgets (buffer, sizeof buffer, fp)
- + || !fgets (buffer, sizeof buffer, fp)
- + || (subjsw && !fgets (buffer, sizeof buffer, fp)))
- + adios (NULLCP, "premature eof");
- + for (partno = 1; partno <= nparts; partno++) {
- + int lineno;
- + char tmpdrf[BUFSIZ];
- + FILE *out;
- +
- + (void) strcpy (tmpdrf, m_tmpfil (invo_name));
- + if ((out = fopen (tmpdrf, "w")) == NULL)
- + adios (tmpdrf, "unable to open for writing");
- + (void) chmod (tmpdrf, 0600);
- +
- + fprintf (out, "To: %s\n", mailsw);
- + if (subjsw)
- + fprintf (out, "Subject: %s\n", subjsw);
- + fprintf (out, "%s: %s\n", VRSN_FIELD, VRSN_VALUE);
- + fprintf (out,
- + "%s: message/partial; id=\"%s\";\n\tnumber=%d; total=%d\n",
- + TYPE_FIELD, msgid, partno, nparts);
- + fprintf (out, "%s: part %d of %d\n\n", DESCR_FIELD, partno,
- + nparts);
- +
- + if (partno == 1)
- + fprintf (out, "Message-ID: %s\n", msgid);
- +
- + for (lineno = LPERMSG; lineno > 0; lineno--) {
- + if (!fgets (buffer, sizeof buffer, fp)) {
- + if (partno == nparts)
- + break;
- + adios (NULLCP, "premature eof");
- + }
- +
- + (void) fputs (buffer, out);
- + }
- +
- + if (fflush (out))
- + adios (tmpdrf, "error writing to");
- +
- + (void) fclose (out);
- +
- + if (slowsw > 0 && 1 < partno && partno < nparts) {
- + if (verbosw) {
- + printf ("pausing %d seconds before sending part %d...\n",
- + slowsw, partno);
- + (void) fflush (stdout);
- + }
- +
- + sleep ((unsigned) slowsw);
- + }
- +
- + status = via_post (tmpdrf);
- + (void) unlink (tmpdrf);
- + if (status)
- + break;
- + }
- + }
- +
- + (void) fclose (fp);
- + (void) unlink (tmpfil);
- +
- + done (status ? 1 : 0);
- + }
- +
- + /* */
- +
- + static int via_post (file)
- + char *file;
- + {
- + int child_id,
- + i;
- +
- + for (i = 0; (child_id = fork ()) == NOTOK && i < 5; i++)
- + sleep (5);
- + switch (child_id) {
- + case NOTOK:
- + adios ("fork", "unable to");
- + /* NOTREACHED */
- +
- + case OK:
- + (void) execlp (postproc, r1bindex (postproc, '/'), file, NULLCP);
- + fprintf (stderr, "unable to exec ");
- + perror (postproc);
- + _exit (-1);
- + /* NOTREACHED */
- +
- + default:
- + return pidXwait (child_id, postproc);
- + }
- + }
- +
- + /* */
- +
- + void done (status)
- + int status;
- + {
- + register CT *ctp;
- +
- + if (ctp = cts)
- + for (; *ctp; ctp++)
- + free_content (*ctp);
- + if (free_ct)
- + free_content (free_ct);
- + if (free_file)
- + (void) unlink (free_file);
- +
- + exit (status);
- + }
- +
- +
- + static int pidcheck (status)
- + int status;
- + {
- + if ((status & 0xff00) == 0xff00 || (status & 0x007f) != SIGQUIT)
- + return status;
- +
- + (void) unlink ("core");
- +
- + (void) fflush (stdout);
- +
- + (void) fflush (stderr);
- +
- + done (1);
- + /* NOTREACHED */
- + }
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- uip/mhparam.c Mon Dec 14 16:21:20 1992
- ***************
- *** 0 ****
- --- 1,167 ----
- + /* mhparam.c - print mh_profile values */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: mhparam.c,v 1.7 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
- + /* contributed by Jeffrey C Honig <Jeffrey_C_Honig@cornell.edu> */
- +
- + #include "../h/mh.h"
- + #include <stdio.h>
- +
- + /* */
- +
- + static struct swit switches[] = {
- + #define COMPSW 0
- + "components", 0,
- + #define NCOMPSW 1
- + "nocomponents", 0,
- + #define ALLSW 2
- + "all", 0,
- + #define HELPSW 3
- + "help", 4,
- +
- + NULL, 0
- + };
- +
- + static char *p_find();
- +
- + /* */
- +
- + /* ARGSUSED */
- +
- + main(argc, argv)
- + int argc;
- + char *argv[];
- + {
- + int i,
- + all = 0,
- + compp = 0,
- + components = -1,
- + missed = 0;
- + char *cp,
- + buf[100],
- + **ap,
- + **argp,
- + *arguments[MAXARGS],
- + *comps[MAXARGS];
- +
- + invo_name = r1bindex (argv[0], '/');
- + if ((cp = m_find (invo_name)) != NULL) {
- + ap = brkstring (cp = getcpy (cp), " ", "\n");
- + ap = copyip (ap, arguments);
- + }
- + else
- + ap = arguments;
- + (void) copyip (argv + 1, ap);
- + argp = arguments;
- +
- + /* */
- +
- + while (cp = *argp++) {
- + if (*cp == '-')
- + switch (smatch (++cp, switches)) {
- + case AMBIGSW:
- + ambigsw (cp, switches);
- + done (1);
- + case UNKWNSW:
- + adios (NULLCP, "-%s unknown", cp);
- + case HELPSW:
- + (void) sprintf (buf, "%s [profile-components] [switches]",
- + invo_name);
- + help (buf, switches);
- + done (1);
- +
- + case COMPSW:
- + components = 1;
- + break;
- + case NCOMPSW:
- + components = 0;
- + break;
- +
- + case ALLSW:
- + all = 1;
- + break;
- +
- + }
- + else
- + comps[compp++] = cp;
- + }
- +
- + /* */
- +
- + if (all) {
- + register struct node *np;
- +
- + if (compp)
- + advise(NULLCP, "profile-components ignored with -all");
- +
- + if (components >= 0)
- + advise(NULLCP, "-%scomponents ignored with -all",
- + components ? "" : "no");
- +
- + m_getdefs ();
- + for (np = m_defs; np; np = np -> n_next)
- + printf("%s:\t%s\n", np -> n_name, np -> n_field);
- + } else {
- + if (components < 0)
- + components = compp > 1;
- +
- + for (i = 0; i < compp; i++) {
- + register char *value = m_find(comps[i]);
- +
- + if (!value)
- + value = p_find(comps[i]);
- +
- + if (value) {
- + if (components)
- + printf("%s:\t", comps[i]);
- +
- + printf("%s\n", value);
- + } else
- + missed++;
- + }
- + }
- +
- + done (missed);
- + }
- +
- + static struct procs {
- + char *p_name;
- + char **p_field;
- + } procs [] = {
- + { "context", &context },
- + { "faceproc", &faceproc },
- + { "fileproc", &fileproc },
- + { "foldprot", &foldprot },
- + { "incproc", &incproc },
- + { "installproc", &installproc },
- + { "lproc", &lproc },
- + { "mailproc", &mailproc },
- + { "mhlproc", &mhlproc },
- + { "moreproc", &moreproc },
- + { "msgprot", &msgprot },
- + { "mshproc", &mshproc },
- + { "packproc", &packproc },
- + { "postproc", &postproc },
- + { "rmfproc", &rmfproc },
- + { "rmmproc", &rmmproc },
- + { "sendproc", &sendproc },
- + { "showproc", &showproc },
- + { "slocalproc", &slocalproc },
- + { "version", &version },
- + { "vmhproc", &vmhproc },
- + { "whatnowproc", &whatnowproc },
- + { "whomproc", &whomproc },
- + { NULL, NULL },
- + };
- +
- + static char *p_find(str)
- + register char *str;
- + {
- + register struct procs *ps;
- +
- + for (ps = procs; ps->p_name; ps++)
- + if (uleq (ps -> p_name, str))
- + return (*ps -> p_field);
- +
- + return NULL;
- + }
- *** ../mh-6.7.2/uip/mhpath.c Thu Oct 29 15:02:27 1987
- --- uip/mhpath.c Mon Dec 14 16:21:21 1992
- ***************
- *** 1,7 ****
- --- 1,13 ----
- /* mhpath.c - print full pathnames */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: mhpath.c,v 1.4 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
- /* */
-
- ***************
- *** 9,15 ****
- #define HELPSW 0
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 15,21 ----
- #define HELPSW 0
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 32,37 ****
- --- 38,46 ----
- *msgs[MAXARGS];
- struct msgs *mp;
-
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- invo_name = r1bindex (argv[0], '/');
- if ((cp = m_find (invo_name)) != NULL) {
- ap = brkstring (cp = getcpy (cp), " ", "\n");
- *** ../mh-6.7.2/uip/msgchk.c Thu Apr 5 16:03:44 1990
- --- uip/msgchk.c Mon Dec 14 16:21:21 1992
- ***************
- *** 1,7 ****
- /* msgchk.c - check for mail */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: msgchk.c,v 1.3 90/04/05 15:01:32 sources Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include <stdio.h>
- --- 1,7 ----
- /* msgchk.c - check for mail */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: msgchk.c,v 1.11 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include <stdio.h>
- ***************
- *** 10,30 ****
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <pwd.h>
-
- /* */
-
- #ifndef POP
- #define POPminc(a) (a)
- ! #else POP
- #define POPminc(a) 0
- ! #endif POP
-
- #ifndef RPOP
- #define RPOPminc(a) (a)
- ! #else RPOP
- #define RPOPminc(a) 0
- ! #endif RPOP
-
- static struct swit switches[] = {
- #define DATESW 0
- "date", 0,
- --- 10,42 ----
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <pwd.h>
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
- + #ifdef HESIOD
- + #include <hesiod.h>
- + #endif
-
- /* */
-
- #ifndef POP
- #define POPminc(a) (a)
- ! #else /* POP */
- #define POPminc(a) 0
- ! #endif /* POP */
-
- #ifndef RPOP
- #define RPOPminc(a) (a)
- ! #else /* RPOP */
- #define RPOPminc(a) 0
- ! #endif /* RPOP */
-
- + #ifndef APOP
- + #define APOPminc(a) (a)
- + #else
- + #define APOPminc(a) 0
- + #endif
- +
- static struct swit switches[] = {
- #define DATESW 0
- "date", 0,
- ***************
- *** 41,55 ****
- #define USERSW 5
- "user user", POPminc (-4),
-
- ! #define RPOPSW 6
- "rpop", RPOPminc (-4),
- ! #define NRPOPSW 7
- "norpop", RPOPminc (-6),
-
- ! #define HELPSW 8
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 53,72 ----
- #define USERSW 5
- "user user", POPminc (-4),
-
- ! #define APOPSW 6
- ! "apop", APOPminc (-4),
- ! #define NAPOPSW 7
- ! "noapop", APOPminc (-6),
- !
- ! #define RPOPSW 8
- "rpop", RPOPminc (-4),
- ! #define NRPOPSW 9
- "norpop", RPOPminc (-6),
-
- ! #define HELPSW 10
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 70,77 ****
-
-
- #ifdef SYS5
- struct passwd *getpwuid(), *getpwnam();
- ! #endif SYS5
-
- static int donote(), checkmail(), remotemail();
- /* */
- --- 87,96 ----
-
-
- #ifdef SYS5
- + #ifndef __STDC__
- struct passwd *getpwuid(), *getpwnam();
- ! #endif /* !__STDC__ */
- ! #endif /* SYS5 */
-
- static int donote(), checkmail(), remotemail();
- /* */
- ***************
- *** 88,93 ****
- --- 107,113 ----
- status = 0,
- snoop = 0,
- vecp = 0;
- + int uid = getuid ();
- char *cp,
- *host = NULL,
- buf[80],
- ***************
- *** 95,110 ****
- **argp,
- *arguments[MAXARGS],
- *vec[50];
- struct passwd *pw;
-
- invo_name = r1bindex (argv[0], '/');
- mts_init (invo_name);
- #ifdef POP
- - if (pophost && *pophost)
- - host = pophost;
- if ((cp = getenv ("MHPOPDEBUG")) && *cp)
- snoop++;
- ! #endif POP
- if ((cp = m_find (invo_name)) != NULL) {
- ap = brkstring (cp = getcpy (cp), " ", "\n");
- ap = copyip (ap, arguments);
- --- 115,137 ----
- **argp,
- *arguments[MAXARGS],
- *vec[50];
- + char *user = getusr ();
- struct passwd *pw;
- + #ifdef HESIOD
- + struct hes_postoffice *po;
- + char *tmphost;
- + #endif
-
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- invo_name = r1bindex (argv[0], '/');
- mts_init (invo_name);
- #ifdef POP
- if ((cp = getenv ("MHPOPDEBUG")) && *cp)
- snoop++;
- ! #endif
- !
- if ((cp = m_find (invo_name)) != NULL) {
- ap = brkstring (cp = getcpy (cp), " ", "\n");
- ap = copyip (ap, arguments);
- ***************
- *** 157,165 ****
- adios (NULLCP, "missing argument to %s", argp[-2]);
- vec[vecp++] = cp;
- continue;
- case RPOPSW:
- ! rpop++;
- continue;
- case NRPOPSW:
- rpop = 0;
- continue;
- --- 184,196 ----
- adios (NULLCP, "missing argument to %s", argp[-2]);
- vec[vecp++] = cp;
- continue;
- + case APOPSW:
- + rpop = -1;
- + continue;
- case RPOPSW:
- ! rpop = 1;
- continue;
- + case NAPOPSW:
- case NRPOPSW:
- rpop = 0;
- continue;
- ***************
- *** 168,190 ****
- }
-
- /* */
- -
- #ifdef POP
- if (!host || !*host)
- host = NULL;
- ! if (!host || !rpop)
- ! (void) setuid (getuid ());
- ! #endif POP
- if (vecp == 0) {
- #ifdef POP
- if (host)
- ! status = remotemail (host, NULLCP, rpop, notifysw, 1, snoop);
- else
- ! #endif POP
- ! if ((pw = getpwuid (getuid ())) == NULL)
- ! adios (NULLCP, "you lose");
- ! else
- ! status = checkmail (pw, datesw, notifysw, 1);
- }
- else {
- vec[vecp] = NULL;
- --- 199,247 ----
- }
-
- /* */
- #ifdef POP
- + #ifdef HESIOD
- + /*
- + * Scheme is:
- + * use MAILHOST environment variable if present,
- + * else try Hesiod.
- + * If that fails, use the default (if any)
- + * provided by mtstailor in mts_init()
- + */
- + if (pophost == NULL || pophost[0] == '\0')
- + {
- + if ((tmphost = getenv("MAILHOST")) != NULL)
- + pophost = tmphost;
- + else if ((po = hes_getmailhost(vecp ? vec[0] : user)) != NULL &&
- + strcmp(po->po_type, "POP") == 0)
- + pophost = po->po_host;
- + }
- + #endif /* HESIOD */
- + if (pophost && *pophost)
- + host = pophost;
- if (!host || !*host)
- host = NULL;
- ! if (!host || rpop <= 0)
- ! (void) setuid (uid);
- ! #endif /* POP */
- if (vecp == 0) {
- #ifdef POP
- if (host)
- ! status = remotemail (host, user, rpop, notifysw, 1, snoop);
- else
- ! #endif
- ! {
- ! char *home = (uid = geteuid()) ? home = getenv ("HOME") : NULL;
- ! if (home == NULL)
- ! {
- ! pw = getpwnam (user);
- ! if (pw == NULL)
- ! adios (NULLCP, "unable to get information about user");
- ! if (home == NULL)
- ! home = pw->pw_dir;
- ! }
- ! status = checkmail (user, home, datesw, notifysw, 1);
- ! }
- }
- else {
- vec[vecp] = NULL;
- ***************
- *** 194,202 ****
- if (host)
- status += remotemail (host, cp, rpop, notifysw, 0, snoop);
- else
- ! #endif POP
- if (pw = getpwnam (cp))
- ! status += checkmail (pw, datesw, notifysw, 0);
- else
- advise (NULLCP, "no such user as %s", cp);
- }
- --- 251,259 ----
- if (host)
- status += remotemail (host, cp, rpop, notifysw, 0, snoop);
- else
- ! #endif
- if (pw = getpwnam (cp))
- ! status += checkmail (pw->pw_name, pw->pw_dir, datesw, notifysw, 0);
- else
- advise (NULLCP, "no such user as %s", cp);
- }
- ***************
- *** 214,220 ****
- #define NNMAISW 2
- "nomail", 0,
-
- ! NULL, NULL
- };
-
-
- --- 271,277 ----
- #define NNMAISW 2
- "nomail", 0,
-
- ! NULL, 0
- };
-
-
- ***************
- *** 242,251 ****
-
- #ifdef MF
- /* ARGSUSED */
- ! #endif MF
-
- ! static int checkmail (pw, datesw, notifysw, personal)
- ! register struct passwd *pw;
- int datesw,
- notifysw,
- personal;
- --- 299,308 ----
-
- #ifdef MF
- /* ARGSUSED */
- ! #endif /* MF */
-
- ! static int checkmail (user, home, datesw, notifysw, personal)
- ! register char *user, *home;
- int datesw,
- notifysw,
- personal;
- ***************
- *** 256,269 ****
- struct stat st;
-
- (void) sprintf (buffer, "%s/%s",
- ! mmdfldir[0] ? mmdfldir : pw -> pw_dir,
- ! mmdflfil[0] ? mmdflfil : pw -> pw_name);
- #ifndef MF
- if (datesw) {
- st.st_size = 0;
- st.st_atime = st.st_mtime = 0;
- }
- ! #endif MF
- mf = (stat (buffer, &st) == NOTOK || st.st_size == 0) ? NONEOK
- : st.st_atime <= st.st_mtime ? MMDFNEW : MMDFOLD;
-
- --- 313,326 ----
- struct stat st;
-
- (void) sprintf (buffer, "%s/%s",
- ! mmdfldir[0] ? mmdfldir : home,
- ! mmdflfil[0] ? mmdflfil : user);
- #ifndef MF
- if (datesw) {
- st.st_size = 0;
- st.st_atime = st.st_mtime = 0;
- }
- ! #endif /* MF */
- mf = (stat (buffer, &st) == NOTOK || st.st_size == 0) ? NONEOK
- : st.st_atime <= st.st_mtime ? MMDFNEW : MMDFOLD;
-
- ***************
- *** 270,285 ****
- #ifdef MF
- if (umincproc != NULL && *umincproc != NULL) {
- (void) sprintf (buffer, "%s/%s",
- ! uucpldir[0] ? uucpldir : pw -> pw_dir,
- ! uucplfil[0] ? uucplfil : pw -> pw_name);
- mf |= (stat (buffer, &st) == NOTOK || st.st_size == 0) ? NONEOK
- : st.st_atime <= st.st_mtime ? UUCPNEW : UUCPOLD;
- }
- ! #endif MF
-
- if ((mf & UUCPOK) || (mf & MMDFOK)) {
- if (notifysw & NT_MAIL) {
- ! printf (personal ? "You have " : "%s has ", pw -> pw_name);
- if (mf & UUCPOK)
- printf ("%s old-style bell", mf & UUCPOLD ? "old" : "new");
- if ((mf & UUCPOK) && (mf & MMDFOK))
- --- 327,342 ----
- #ifdef MF
- if (umincproc != NULL && *umincproc != NULL) {
- (void) sprintf (buffer, "%s/%s",
- ! uucpldir[0] ? uucpldir : home,
- ! uucplfil[0] ? uucplfil : user);
- mf |= (stat (buffer, &st) == NOTOK || st.st_size == 0) ? NONEOK
- : st.st_atime <= st.st_mtime ? UUCPNEW : UUCPOLD;
- }
- ! #endif /* MF */
-
- if ((mf & UUCPOK) || (mf & MMDFOK)) {
- if (notifysw & NT_MAIL) {
- ! printf (personal ? "You have " : "%s has ", user);
- if (mf & UUCPOK)
- printf ("%s old-style bell", mf & UUCPOLD ? "old" : "new");
- if ((mf & UUCPOK) && (mf & MMDFOK))
- ***************
- *** 297,303 ****
- else {
- if (notifysw & NT_NMAI)
- printf (personal ? "You don't %s%s" : "%s doesn't %s",
- ! personal ? "" : pw -> pw_name, "have any mail waiting");
- else
- notifysw = 0;
-
- --- 354,360 ----
- else {
- if (notifysw & NT_NMAI)
- printf (personal ? "You don't %s%s" : "%s doesn't %s",
- ! personal ? "" : user, "have any mail waiting");
- else
- notifysw = 0;
-
- ***************
- *** 309,315 ****
- if (datesw && st.st_atime)
- printf ("; last read on %s",
- dasctime (dlocaltime ((long *) & st.st_atime), TW_NULL));
- ! #endif MF
- if (notifysw)
- printf ("\n");
-
- --- 366,372 ----
- if (datesw && st.st_atime)
- printf ("; last read on %s",
- dasctime (dlocaltime ((long *) & st.st_atime), TW_NULL));
- ! #endif /* MF */
- if (notifysw)
- printf ("\n");
-
- ***************
- *** 374,377 ****
-
- return status;
- }
- ! #endif POP
- --- 431,434 ----
-
- return status;
- }
- ! #endif /* POP */
- *** ../mh-6.7.2/uip/msh.c Thu Apr 5 16:02:57 1990
- --- uip/msh.c Mon Dec 14 16:21:24 1992
- ***************
- *** 1,7 ****
- /* msh.c - The MH shell (sigh) */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: msh.c,v 2.5 90/04/05 14:56:36 sources Exp $";
- ! #endif lint
-
- /* TODO:
- Keep more status information in maildrop map
- --- 1,7 ----
- /* msh.c - The MH shell (sigh) */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: msh.c,v 2.13 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- /* TODO:
- Keep more status information in maildrop map
- ***************
- *** 19,36 ****
- #include <sys/stat.h>
- #ifndef SYS5
- #include <sgtty.h>
- ! #else SYS5
- #include <termio.h>
- #ifndef NOIOCTLH
- #include <sys/ioctl.h>
- ! #endif NOIOCTLH
- ! #endif SYS5
- #include <pwd.h>
- #include <setjmp.h>
- #include <signal.h>
- #include "../h/mshsbr.h"
- #include "../h/vmhsbr.h"
-
-
- #define QUOTE '\\' /* sigh */
-
- --- 19,44 ----
- #include <sys/stat.h>
- #ifndef SYS5
- #include <sgtty.h>
- ! #else /* SYS5 */
- #include <termio.h>
- #ifndef NOIOCTLH
- #include <sys/ioctl.h>
- ! #endif /* NOIOCTLH */
- ! #endif /* SYS5 */
- #include <pwd.h>
- #include <setjmp.h>
- #include <signal.h>
- #include "../h/mshsbr.h"
- #include "../h/vmhsbr.h"
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
- + #ifdef MIME
- + #define MIMEminc(a) (a)
- + #else
- + #define MIMEminc(a) 0
- + #endif
-
- #define QUOTE '\\' /* sigh */
-
- ***************
- *** 73,79 ****
- #define HELPSW 13
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 81,87 ----
- #define HELPSW 13
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 117,132 ****
- static jmp_buf peerenv;
-
- void padios (), padvise ();
- ! static int alrmser ();
-
-
- #ifdef BPOP
- /* POP */
-
- ! static int pmsh = 0; /* BPOP enabled */
-
- extern char response[];
- ! #endif BPOP
-
-
- /* PARENT */
- --- 125,140 ----
- static jmp_buf peerenv;
-
- void padios (), padvise ();
- ! static TYPESIG alrmser ();
-
-
- #ifdef BPOP
- /* POP */
-
- ! int pmsh = 0; /* BPOP enabled */
-
- extern char response[];
- ! #endif /* BPOP */
-
-
- /* PARENT */
- ***************
- *** 159,165 ****
- TYPESIG (*qstat) (); /* original SIGQUIT */
- #ifdef SIGTSTP
- static TYPESIG (*tstat) (); /* original SIGTSTP */
- ! #endif SIGTSTP
- int interrupted; /* SIGINT detected */
- int broken_pipe; /* SIGPIPE detected */
- int told_to_quit; /* SIGQUIT detected */
- --- 167,173 ----
- TYPESIG (*qstat) (); /* original SIGQUIT */
- #ifdef SIGTSTP
- static TYPESIG (*tstat) (); /* original SIGTSTP */
- ! #endif /* SIGTSTP */
- int interrupted; /* SIGINT detected */
- int broken_pipe; /* SIGPIPE detected */
- int told_to_quit; /* SIGQUIT detected */
- ***************
- *** 167,180 ****
- #ifdef BSD42
- int should_intr; /* signal handler should interrupt call */
- jmp_buf sigenv; /* the environment pointer */
- ! #endif BSD42
-
- ! static int intrser (), pipeser (), quitser ();
-
-
- #ifdef SYS5
- struct passwd *getpwnam ();
- ! #endif SYS5
-
- static int read_map(), read_file(), check_folder(), getargs(), parse();
- static int getcmds(), init_io(), initaux_io(), finaux_io(), peerwait();
- --- 175,190 ----
- #ifdef BSD42
- int should_intr; /* signal handler should interrupt call */
- jmp_buf sigenv; /* the environment pointer */
- ! #endif /* BSD42 */
-
- ! static TYPESIG intrser (), pipeser (), quitser ();
-
-
- + #ifndef __STDC__
- #ifdef SYS5
- struct passwd *getpwnam ();
- ! #endif /* SYS5 */
- ! #endif
-
- static int read_map(), read_file(), check_folder(), getargs(), parse();
- static int getcmds(), init_io(), initaux_io(), finaux_io(), peerwait();
- ***************
- *** 200,206 ****
- #ifdef BPOP
- int pmsh1 = 0,
- pmsh2 = 0;
- ! #endif BPOP
- char *cp,
- *file = NULL,
- *folder = NULL,
- --- 210,216 ----
- #ifdef BPOP
- int pmsh1 = 0,
- pmsh2 = 0;
- ! #endif /* BPOP */
- char *cp,
- *file = NULL,
- *folder = NULL,
- ***************
- *** 209,214 ****
- --- 219,227 ----
- buf[80],
- *arguments[MAXARGS];
-
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- invo_name = r1bindex (argv[0], '/');
- mts_init (invo_name);
- if ((cp = m_find (invo_name)) != NULL) {
- ***************
- *** 289,295 ****
- #ifdef BPOP
- if ((pmsh1 = atoi (cp)) < 1)
- adios (NULLCP, "bad argument %s %s", argp[-2], cp);
- ! #endif BPOP
- continue;
- case PWRITSW:
- if (!(cp = *argp++) || *cp == '-')
- --- 302,308 ----
- #ifdef BPOP
- if ((pmsh1 = atoi (cp)) < 1)
- adios (NULLCP, "bad argument %s %s", argp[-2], cp);
- ! #endif /* BPOP */
- continue;
- case PWRITSW:
- if (!(cp = *argp++) || *cp == '-')
- ***************
- *** 297,303 ****
- #ifdef BPOP
- if ((pmsh2 = atoi (cp)) < 1)
- adios (NULLCP, "bad argument %s %s", argp[-2], cp);
- ! #endif BPOP
- continue;
-
- case TCURSW:
- --- 310,316 ----
- #ifdef BPOP
- if ((pmsh2 = atoi (cp)) < 1)
- adios (NULLCP, "bad argument %s %s", argp[-2], cp);
- ! #endif /* BPOP */
- continue;
-
- case TCURSW:
- ***************
- *** 330,340 ****
- #ifdef FIOCLEX
- if (pfd > 1)
- (void) ioctl (pfd, FIOCLEX, NULLCP);
- ! #endif FIOCLEX
-
- #ifdef BSD42
- should_intr = 0;
- ! #endif BSD42
- setsigx (istat, SIGINT, intrser);
- setsigx (qstat, SIGQUIT, quitser);
-
- --- 343,353 ----
- #ifdef FIOCLEX
- if (pfd > 1)
- (void) ioctl (pfd, FIOCLEX, NULLCP);
- ! #endif /* FIOCLEX */
-
- #ifdef BSD42
- should_intr = 0;
- ! #endif /* BSD42 */
- setsigx (istat, SIGINT, intrser);
- setsigx (qstat, SIGQUIT, quitser);
-
- ***************
- *** 347,353 ****
- (void) signal (SIGQUIT, SIG_IGN);
- #ifdef SIGTSTP
- tstat = signal (SIGTSTP, SIG_IGN);
- ! #endif SIGTSTP
- }
-
- #ifdef BPOP
- --- 360,366 ----
- (void) signal (SIGQUIT, SIG_IGN);
- #ifdef SIGTSTP
- tstat = signal (SIGTSTP, SIG_IGN);
- ! #endif /* SIGTSTP */
- }
-
- #ifdef BPOP
- ***************
- *** 355,368 ****
- cp = getenv ("MHPOPDEBUG");
- #ifdef NNTP
- if (pop_set (pmsh1, pmsh2, cp && *cp, myname) == NOTOK)
- ! #else NNTP
- if (pop_set (pmsh1, pmsh2, cp && *cp) == NOTOK)
- ! #endif NNTP
- padios (NULLCP, "%s", response);
- if (folder)
- file = folder, folder = NULL;
- }
- ! #endif BPOP
-
- if (folder)
- fsetup (folder);
- --- 368,381 ----
- cp = getenv ("MHPOPDEBUG");
- #ifdef NNTP
- if (pop_set (pmsh1, pmsh2, cp && *cp, myname) == NOTOK)
- ! #else /* NNTP */
- if (pop_set (pmsh1, pmsh2, cp && *cp) == NOTOK)
- ! #endif /* NNTP */
- padios (NULLCP, "%s", response);
- if (folder)
- file = folder, folder = NULL;
- }
- ! #endif /* BPOP */
-
- if (folder)
- fsetup (folder);
- ***************
- *** 405,442 ****
- "mark", 0,
- #define MAILCMD 11
- "mhmail", 0,
- ! #define MSGKCMD 12
- "msgchk", 0,
- ! #define NEXTCMD 13
- "next", 0,
- ! #define PACKCMD 14
- "packf", 0,
- ! #define PICKCMD 15
- "pick", 0,
- ! #define PREVCMD 16
- "prev", 0,
- ! #define QUITCMD 17
- "quit", 0,
- ! #define FILECMD 18
- "refile", 0,
- ! #define REPLCMD 19
- "repl", 0,
- ! #define RMMCMD 20
- "rmm", 0,
- ! #define SCANCMD 21
- "scan", 0,
- ! #define SENDCMD 22
- "send", 0,
- ! #define SHOWCMD 23
- "show", 0,
- ! #define SORTCMD 24
- "sortm", 0,
- ! #define WHATCMD 25
- "whatnow", 0,
- ! #define WHOMCMD 26
- "whom", 0,
-
- ! NULL, NULL
- };
-
- /* */
- --- 418,457 ----
- "mark", 0,
- #define MAILCMD 11
- "mhmail", 0,
- ! #define MHNCMD 12
- ! "mhn", MIMEminc(-3),
- ! #define MSGKCMD 13
- "msgchk", 0,
- ! #define NEXTCMD 14
- "next", 0,
- ! #define PACKCMD 15
- "packf", 0,
- ! #define PICKCMD 16
- "pick", 0,
- ! #define PREVCMD 17
- "prev", 0,
- ! #define QUITCMD 18
- "quit", 0,
- ! #define FILECMD 19
- "refile", 0,
- ! #define REPLCMD 20
- "repl", 0,
- ! #define RMMCMD 21
- "rmm", 0,
- ! #define SCANCMD 22
- "scan", 0,
- ! #define SENDCMD 23
- "send", 0,
- ! #define SHOWCMD 24
- "show", 0,
- ! #define SORTCMD 25
- "sortm", 0,
- ! #define WHATCMD 26
- "whatnow", 0,
- ! #define WHOMCMD 27
- "whom", 0,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 578,583 ****
- --- 593,605 ----
- markcmd (vec);
- break;
-
- + case MHNCMD:
- + #ifdef MIME
- + if (!vmh || ttyN (cmdp) != NOTOK)
- + mhncmd (vec);
- + #endif
- + break;
- +
- case NEXTCMD:
- case PREVCMD:
- case SHOWCMD:
- ***************
- *** 673,681 ****
-
- #ifndef BSD42
- maxfds = _NFILE / 2;
- ! #else BSD42
- maxfds = getdtablesize () / 2;
- ! #endif BSD42
- if ((maxfds -= 2) < 1)
- maxfds = 1;
- }
- --- 695,703 ----
-
- #ifndef BSD42
- maxfds = _NFILE / 2;
- ! #else /* BSD42 */
- maxfds = getdtablesize () / 2;
- ! #endif /* BSD42 */
- if ((maxfds -= 2) < 1)
- maxfds = 1;
- }
- ***************
- *** 689,695 ****
- msgp;
- #ifdef BPOP
- char tmpfil[BUFSIZ];
- ! #endif BPOP
- struct stat st;
-
- #ifdef BPOP
- --- 711,717 ----
- msgp;
- #ifdef BPOP
- char tmpfil[BUFSIZ];
- ! #endif /* BPOP */
- struct stat st;
-
- #ifdef BPOP
- ***************
- *** 700,711 ****
- (void) unlink (tmpfil);
- }
- else
- ! #endif BPOP
- if ((fp = fopen (file, "r")) == NULL)
- padios (file, "unable to read");
- #ifdef FIOCLEX
- (void) ioctl (fileno (fp), FIOCLEX, NULLCP);
- ! #endif FIOCLEX
- if (fstat (fileno (fp), &st) != NOTOK) {
- mode = (int) (st.st_mode & 0777), mtime = st.st_mtime;
- msgp = read_map (file, (long) st.st_size);
- --- 722,733 ----
- (void) unlink (tmpfil);
- }
- else
- ! #endif /* BPOP */
- if ((fp = fopen (file, "r")) == NULL)
- padios (file, "unable to read");
- #ifdef FIOCLEX
- (void) ioctl (fileno (fp), FIOCLEX, NULLCP);
- ! #endif /* FIOCLEX */
- if (fstat (fileno (fp), &st) != NOTOK) {
- mode = (int) (st.st_mode & 0777), mtime = st.st_mtime;
- msgp = read_map (file, (long) st.st_size);
- ***************
- *** 718,724 ****
- if ((msgp = read_file (msgp ? Msgs[msgp].m_stop : 0L, msgp + 1)) < 1)
- padios (NULLCP, "no messages in %s", myname ? myname : file);
-
- ! mp = (struct msgs *) calloc ((unsigned) 1, MSIZE (mp, 1, msgp + 1));
- if (mp == NULL)
- padios (NULLCP, "unable to allocate folder storage");
-
- --- 740,746 ----
- if ((msgp = read_file (msgp ? Msgs[msgp].m_stop : 0L, msgp + 1)) < 1)
- padios (NULLCP, "no messages in %s", myname ? myname : file);
-
- ! mp = (struct msgs *) calloc ((unsigned) 1, MHSIZE (mp, 1, msgp + 1));
- if (mp == NULL)
- padios (NULLCP, "unable to allocate folder storage");
-
- ***************
- *** 728,757 ****
- mp -> curmsg = 0;
-
- mp -> foldpath = getcpy (myname ? myname : file);
- ! mp -> msgflags = NULL;
- #ifdef BPOP
- if (pmsh)
- mp -> msgflags |= READONLY;
- else {
- ! #endif BPOP
- (void) stat (file, &st);
- if (st.st_uid != getuid () || access (file, 02) == NOTOK)
- mp -> msgflags |= READONLY;
- #ifdef BPOP
- }
- ! #endif BPOP
- mp -> lowoff = 1;
- mp -> hghoff = mp -> hghmsg + 1;
-
- #ifdef MTR
- mp -> msgstats = (short *)
- ! calloc ((unsigned) 1, MSIZEX (mp, mp -> lowmsg, mp -> hghmsg));
- if (mp -> msgstats == NULL)
- padios (NULLCP, "unable to allocate messages storage");
- mp -> msgstats = (mp -> msgbase = mp -> msgstats) - mp -> lowoff;
- if (mp -> msgstats < (short *)0)
- padios (NULLCP, "setup() botch -- you lose big");
- ! #endif MTR
- #ifdef BPOP
- if (pmsh) {
- #ifndef NNTP
- --- 750,779 ----
- mp -> curmsg = 0;
-
- mp -> foldpath = getcpy (myname ? myname : file);
- ! mp -> msgflags = 0;
- #ifdef BPOP
- if (pmsh)
- mp -> msgflags |= READONLY;
- else {
- ! #endif /* BPOP */
- (void) stat (file, &st);
- if (st.st_uid != getuid () || access (file, 02) == NOTOK)
- mp -> msgflags |= READONLY;
- #ifdef BPOP
- }
- ! #endif /* BPOP */
- mp -> lowoff = 1;
- mp -> hghoff = mp -> hghmsg + 1;
-
- #ifdef MTR
- mp -> msgstats = (short *)
- ! calloc ((unsigned) 1, MHSIZEX (mp, mp -> lowmsg, mp -> hghmsg));
- if (mp -> msgstats == NULL)
- padios (NULLCP, "unable to allocate messages storage");
- mp -> msgstats = (mp -> msgbase = mp -> msgstats) - mp -> lowoff;
- if (mp -> msgstats < (short *)0)
- padios (NULLCP, "setup() botch -- you lose big");
- ! #endif /* MTR */
- #ifdef BPOP
- if (pmsh) {
- #ifndef NNTP
- ***************
- *** 759,773 ****
- Msgs[i].m_top = i;
- mp -> msgstats[i] = EXISTS | VIRTUAL;
- }
- ! #else NNTP
- for (i = mp -> lowmsg; i <= mp -> hghmsg; i++) {
- if (Msgs[i].m_top) /* set in read_pop() */
- mp -> msgstats[i] = EXISTS | VIRTUAL;
- }
- ! #endif NNTP
- }
- else
- ! #endif BPOP
- for (i = mp -> lowmsg; i <= mp -> hghmsg; i++)
- mp -> msgstats[i] = EXISTS;
- m_init ();
- --- 781,795 ----
- Msgs[i].m_top = i;
- mp -> msgstats[i] = EXISTS | VIRTUAL;
- }
- ! #else /* NNTP */
- for (i = mp -> lowmsg; i <= mp -> hghmsg; i++) {
- if (Msgs[i].m_top) /* set in read_pop() */
- mp -> msgstats[i] = EXISTS | VIRTUAL;
- }
- ! #endif /* NNTP */
- }
- else
- ! #endif /* BPOP */
- for (i = mp -> lowmsg; i <= mp -> hghmsg; i++)
- mp -> msgstats[i] = EXISTS;
- m_init ();
- ***************
- *** 797,803 ****
- #ifdef BPOP
- if (pmsh)
- return read_pop ();
- ! #endif BPOP
-
- if ((i = map_read (file, size, &rp, 1)) == 0)
- return 0;
- --- 819,825 ----
- #ifdef BPOP
- if (pmsh)
- return read_pop ();
- ! #endif /* BPOP */
-
- if ((i = map_read (file, size, &rp, 1)) == 0)
- return 0;
- ***************
- *** 832,838 ****
- #ifdef BPOP
- if (pmsh)
- return (msgp - 1);
- ! #endif BPOP
-
- if ((i = mbx_read (fp, pos, &rp, 1)) <= 0)
- return (msgp - 1);
- --- 854,860 ----
- #ifdef BPOP
- if (pmsh)
- return (msgp - 1);
- ! #endif /* BPOP */
-
- if ((i = mbx_read (fp, pos, &rp, 1)) <= 0)
- return (msgp - 1);
- ***************
- *** 867,873 ****
- Msgs[n].m_top = Msgs[n].m_bboard_id = i;
- }
-
- ! #endif NNTP
- static int read_pop () {
- int nmsgs,
- nbytes;
- --- 889,895 ----
- Msgs[n].m_top = Msgs[n].m_bboard_id = i;
- }
-
- ! #endif /* NNTP */
- static int read_pop () {
- int nmsgs,
- nbytes;
- ***************
- *** 880,886 ****
- #ifdef NNTP /* this makes read_pop() do some real work... */
- pop_base = nbytes - 1; /* nmsgs=last-first+1, nbytes=first */
- pop_exists (pop_statmsg);
- ! #endif NNTP
- return nmsgs;
- }
-
- --- 902,908 ----
- #ifdef NNTP /* this makes read_pop() do some real work... */
- pop_base = nbytes - 1; /* nmsgs=last-first+1, nbytes=first */
- pop_exists (pop_statmsg);
- ! #endif /* NNTP */
- return nmsgs;
- }
-
- ***************
- *** 890,896 ****
- {
- fprintf (yp, "%s\n", s);
- }
- ! #endif BPOP
-
- /* */
-
- --- 912,918 ----
- {
- fprintf (yp, "%s\n", s);
- }
- ! #endif /* BPOP */
-
- /* */
-
- ***************
- *** 897,902 ****
- --- 919,926 ----
- static m_gMsgs (n)
- int n;
- {
- + int nmsgs;
- +
- if (Msgs == NULL) {
- nMsgs = n + MAXFOLDER / 2;
- Msgs = (struct Msg *) calloc ((unsigned) (nMsgs + 2), sizeof *Msgs);
- ***************
- *** 908,918 ****
- if (nMsgs >= n)
- return;
-
- ! nMsgs = n + MAXFOLDER / 2;
- Msgs = (struct Msg *) realloc ((char *) Msgs,
- ! (unsigned) (nMsgs + 2) * sizeof *Msgs);
- if (Msgs == NULL)
- padios (NULLCP, "unable to reallocate Msgs structure");
- }
-
- /* */
- --- 932,946 ----
- if (nMsgs >= n)
- return;
-
- ! nmsgs = nMsgs + n + MAXFOLDER / 2;
- Msgs = (struct Msg *) realloc ((char *) Msgs,
- ! (unsigned) (nmsgs + 2) * sizeof *Msgs);
- if (Msgs == NULL)
- padios (NULLCP, "unable to reallocate Msgs structure");
- + bzero ((char *) (Msgs + nMsgs + 2),
- + (unsigned) ((nmsgs - nMsgs) * sizeof *Msgs));
- +
- + nMsgs = nmsgs;
- }
-
- /* */
- ***************
- *** 1000,1006 ****
-
- mp -> msgstats[msgnum] &= ~VIRTUAL;
- }
- ! #endif BPOP
-
- m_eomsbr ((int (*)()) 0); /* XXX */
- (void) fseek (fp, Msgs[msgnum].m_start, 0);
- --- 1028,1034 ----
-
- mp -> msgstats[msgnum] &= ~VIRTUAL;
- }
- ! #endif /* BPOP */
-
- m_eomsbr ((int (*)()) 0); /* XXX */
- (void) fseek (fp, Msgs[msgnum].m_start, 0);
- ***************
- *** 1022,1028 ****
- #ifdef BPOP
- if (pmsh)
- return 0;
- ! #endif BPOP
-
- if (fmsh) {
- if (stat (mp -> foldpath, &st) == NOTOK)
- --- 1050,1056 ----
- #ifdef BPOP
- if (pmsh)
- return 0;
- ! #endif /* BPOP */
-
- if (fmsh) {
- if (stat (mp -> foldpath, &st) == NOTOK)
- ***************
- *** 1182,1188 ****
- int arg1,
- arg2,
- arg3;
- ! #endif BPOP
- char *bp,
- buf[BUFSIZ],
- name[NAMESZ];
- --- 1210,1216 ----
- int arg1,
- arg2,
- arg3;
- ! #endif /* BPOP */
- char *bp,
- buf[BUFSIZ],
- name[NAMESZ];
- ***************
- *** 1198,1204 ****
- && arg3 > 0)
- return (Msgs[msgnum].m_bboard_id = arg3);
- }
- ! #endif BPOP
-
- zp = msh_ready (msgnum, 0);
- for (state = FLD;;)
- --- 1226,1232 ----
- && arg3 > 0)
- return (Msgs[msgnum].m_bboard_id = arg3);
- }
- ! #endif /* BPOP */
-
- zp = msh_ready (msgnum, 0);
- for (state = FLD;;)
- ***************
- *** 1244,1256 ****
- #ifndef BSD42 /* XXX */
- #ifdef FIOCLEX
- (void) ioctl (sd, FIOCLEX, NULL);
- ! #endif FIOCLEX
- ! #endif not BSD42
- if ((sp = fdopen (sd, "w")) == NULL)
- padios ("standard output", "unable to fdopen");
- }
-
- ! (void) putenv ("mhfolder", mp -> foldpath);
- if (vmh)
- return;
-
- --- 1272,1284 ----
- #ifndef BSD42 /* XXX */
- #ifdef FIOCLEX
- (void) ioctl (sd, FIOCLEX, NULL);
- ! #endif /* FIOCLEX */
- ! #endif /* not BSD42 */
- if ((sp = fdopen (sd, "w")) == NULL)
- padios ("standard output", "unable to fdopen");
- }
-
- ! (void) m_putenv ("mhfolder", mp -> foldpath);
- if (vmh)
- return;
-
- ***************
- *** 1427,1433 ****
- (void) kill (ppid, SIGEMT);
- return EOF;
- }
- ! #endif BSD42
- if (interactive) {
- printf ("%s", prompt);
- (void) fflush (stdout);
- --- 1455,1461 ----
- (void) kill (ppid, SIGEMT);
- return EOF;
- }
- ! #endif /* BSD42 */
- if (interactive) {
- printf ("%s", prompt);
- (void) fflush (stdout);
- ***************
- *** 1444,1459 ****
- (void) kill (ppid, SIGEMT);
- return EOF;
- }
- ! #else BSD42
- if (i == EOF)
- longjmp (sigenv, DONE);
- ! #endif BSD42
- if (cp < &buffer[sizeof buffer - 2])
- *cp++ = i;
- }
- ! *cp = NULL;
-
- ! if (buffer[0] == NULL)
- continue;
- if (buffer[0] == '?') {
- printf ("commands:\n");
- --- 1472,1487 ----
- (void) kill (ppid, SIGEMT);
- return EOF;
- }
- ! #else /* BSD42 */
- if (i == EOF)
- longjmp (sigenv, DONE);
- ! #endif /* BSD42 */
- if (cp < &buffer[sizeof buffer - 2])
- *cp++ = i;
- }
- ! *cp = 0;
-
- ! if (buffer[0] == 0)
- continue;
- if (buffer[0] == '?') {
- printf ("commands:\n");
- ***************
- *** 1477,1483 ****
- default:
- #ifdef BSD42
- should_intr = 0;
- ! #endif BSD42
- return i;
- }
- }
- --- 1505,1511 ----
- default:
- #ifdef BSD42
- should_intr = 0;
- ! #endif /* BSD42 */
- return i;
- }
- }
- ***************
- *** 1532,1538 ****
- *cp,
- *pp;
-
- ! cmdp -> line[0] = NULL;
- pp = cmdp -> args[argp++] = cmdp -> line;
- cmdp -> redirect = NULL;
- cmdp -> direction = STDIO;
- --- 1560,1566 ----
- *cp,
- *pp;
-
- ! cmdp -> line[0] = 0;
- pp = cmdp -> args[argp++] = cmdp -> line;
- cmdp -> redirect = NULL;
- cmdp -> direction = STDIO;
- ***************
- *** 1541,1547 ****
- for (cp = buffer; c = *cp; cp++)
- if (!isspace (c))
- break;
- ! if (c == NULL) {
- if (vmh)
- (void) fmt2peer (RC_EOF, "null command");
- return NOTOK;
- --- 1569,1575 ----
- for (cp = buffer; c = *cp; cp++)
- if (!isspace (c))
- break;
- ! if (c == 0) {
- if (vmh)
- (void) fmt2peer (RC_EOF, "null command");
- return NOTOK;
- ***************
- *** 1551,1561 ****
- if (isspace (c)) {
- while (isspace (c))
- c = *cp++;
- ! if (c == NULL)
- break;
- ! *pp++ = NULL;
- cmdp -> args[argp++] = pp;
- ! *pp = NULL;
- }
-
- switch (c) {
- --- 1579,1589 ----
- if (isspace (c)) {
- while (isspace (c))
- c = *cp++;
- ! if (c == 0)
- break;
- ! *pp++ = 0;
- cmdp -> args[argp++] = pp;
- ! *pp = 0;
- }
-
- switch (c) {
- ***************
- *** 1562,1574 ****
- case '"':
- for (;;) {
- switch (c = *cp++) {
- ! case NULL:
- padvise (NULLCP, "unmatched \"");
- return NOTOK;
- case '"':
- break;
- case QUOTE:
- ! if ((c = *cp++) == NULL)
- goto no_quoting;
- default:
- *pp++ = c;
- --- 1590,1602 ----
- case '"':
- for (;;) {
- switch (c = *cp++) {
- ! case 0:
- padvise (NULLCP, "unmatched \"");
- return NOTOK;
- case '"':
- break;
- case QUOTE:
- ! if ((c = *cp++) == 0)
- goto no_quoting;
- default:
- *pp++ = c;
- ***************
- *** 1579,1585 ****
- continue;
-
- case QUOTE:
- ! if ((c = *cp++) == NULL) {
- no_quoting: ;
- padvise (NULLCP, "the newline character can not be quoted");
- return NOTOK;
- --- 1607,1613 ----
- continue;
-
- case QUOTE:
- ! if ((c = *cp++) == 0) {
- no_quoting: ;
- padvise (NULLCP, "the newline character can not be quoted");
- return NOTOK;
- ***************
- *** 1595,1601 ****
- padvise (NULLCP, "invalid null command");
- return NOTOK;
- }
- ! if (*cmdp -> args[argp - 1] == NULL)
- argp--;
- cmdp -> direction = c == '>' ? CRTIO : PIPIO;
- if (cmdp -> direction == CRTIO && (c = *cp) == '>') {
- --- 1623,1629 ----
- padvise (NULLCP, "invalid null command");
- return NOTOK;
- }
- ! if (*cmdp -> args[argp - 1] == 0)
- argp--;
- cmdp -> direction = c == '>' ? CRTIO : PIPIO;
- if (cmdp -> direction == CRTIO && (c = *cp) == '>') {
- ***************
- *** 1606,1612 ****
- for (; c = *cp; cp++)
- if (!isspace (c))
- break;
- ! if (c == NULL) {
- padvise (NULLCP, cmdp -> direction != PIPIO
- ? "missing name for redirect"
- : "invalid null command");
- --- 1634,1640 ----
- for (; c = *cp; cp++)
- if (!isspace (c))
- break;
- ! if (c == 0) {
- padvise (NULLCP, cmdp -> direction != PIPIO
- ? "missing name for redirect"
- : "invalid null command");
- ***************
- *** 1627,1633 ****
- break;
- }
-
- ! *pp++ = NULL;
- cmdp -> args[argp] = NULL;
-
- return OK;
- --- 1655,1661 ----
- break;
- }
-
- ! *pp++ = 0;
- cmdp -> args[argp] = NULL;
-
- return OK;
- ***************
- *** 1647,1654 ****
- return OK;
-
- if (cp = index (pp = redirect + 1, '/'))
- ! *cp++ = NULL;
- ! if (*pp == NULL)
- pp = mypath;
- else
- if (pw = getpwnam (pp))
- --- 1675,1682 ----
- return OK;
-
- if (cp = index (pp = redirect + 1, '/'))
- ! *cp++ = 0;
- ! if (*pp == 0)
- pp = mypath;
- else
- if (pw = getpwnam (pp))
- ***************
- *** 1793,1799 ****
- (void) pop_done ();
- pmsh = 0;
- }
- ! #endif BPOP
- }
-
- /* */
- --- 1821,1827 ----
- (void) pop_done ();
- pmsh = 0;
- }
- ! #endif /* BPOP */
- }
-
- /* */
- ***************
- *** 1821,1832 ****
-
- /* ARGSUSED */
-
- ! static int intrser (i)
- int i;
- {
- #ifndef BSD42
- (void) signal (SIGINT, intrser);
- ! #endif not BSD42
-
- discard (stdout);
-
- --- 1849,1860 ----
-
- /* ARGSUSED */
-
- ! static TYPESIG intrser (i)
- int i;
- {
- #ifndef BSD42
- (void) signal (SIGINT, intrser);
- ! #endif /* not BSD42 */
-
- discard (stdout);
-
- ***************
- *** 1834,1851 ****
- #ifdef BSD42
- if (should_intr)
- longjmp (sigenv, NOTOK);
- ! #endif BSD42
- }
-
-
- /* ARGSUSED */
-
- ! static int pipeser (i)
- int i;
- {
- #ifndef BSD42
- (void) signal (SIGPIPE, pipeser);
- ! #endif not BSD42
-
- if (broken_pipe++ == 0)
- fprintf (stderr, "broken pipe\n");
- --- 1862,1879 ----
- #ifdef BSD42
- if (should_intr)
- longjmp (sigenv, NOTOK);
- ! #endif /* BSD42 */
- }
-
-
- /* ARGSUSED */
-
- ! static TYPESIG pipeser (i)
- int i;
- {
- #ifndef BSD42
- (void) signal (SIGPIPE, pipeser);
- ! #endif /* not BSD42 */
-
- if (broken_pipe++ == 0)
- fprintf (stderr, "broken pipe\n");
- ***************
- *** 1854,1871 ****
- #ifdef BSD42
- if (should_intr)
- longjmp (sigenv, NOTOK);
- ! #endif BSD42
- }
-
-
- /* ARGSUSED */
-
- ! static int quitser (i)
- int i;
- {
- #ifndef BSD42
- (void) signal (SIGQUIT, quitser);
- ! #endif BSD42
-
- told_to_quit++;
- interrupted++;
- --- 1882,1899 ----
- #ifdef BSD42
- if (should_intr)
- longjmp (sigenv, NOTOK);
- ! #endif /* BSD42 */
- }
-
-
- /* ARGSUSED */
-
- ! static TYPESIG quitser (i)
- int i;
- {
- #ifndef BSD42
- (void) signal (SIGQUIT, quitser);
- ! #endif /* BSD42 */
-
- told_to_quit++;
- interrupted++;
- ***************
- *** 1872,1878 ****
- #ifdef BSD42
- if (should_intr)
- longjmp (sigenv, NOTOK);
- ! #endif BSD42
- }
-
- /* */
- --- 1900,1906 ----
- #ifdef BSD42
- if (should_intr)
- longjmp (sigenv, NOTOK);
- ! #endif /* BSD42 */
- }
-
- /* */
- ***************
- *** 2225,2231 ****
-
- /* ARGSUSED */
-
- ! static int alrmser (i)
- int i;
- {
- longjmp (peerenv, DONE);
- --- 2253,2259 ----
-
- /* ARGSUSED */
-
- ! static TYPESIG alrmser (i)
- int i;
- {
- longjmp (peerenv, DONE);
- ***************
- *** 2265,2271 ****
-
- #ifdef SIGTSTP
- (void) signal (SIGTSTP, tstat);
- ! #endif SIGTSTP
- return vmhtty;
- }
-
- --- 2293,2299 ----
-
- #ifdef SIGTSTP
- (void) signal (SIGTSTP, tstat);
- ! #endif /* SIGTSTP */
- return vmhtty;
- }
-
- ***************
- *** 2279,2285 ****
-
- #ifdef SIGTSTP
- (void) signal (SIGTSTP, SIG_IGN);
- ! #endif SIGTSTP
-
- if (vmhtty != OK)
- return NOTOK;
- --- 2307,2313 ----
-
- #ifdef SIGTSTP
- (void) signal (SIGTSTP, SIG_IGN);
- ! #endif /* SIGTSTP */
-
- if (vmhtty != OK)
- return NOTOK;
- *** ../mh-6.7.2/uip/mshcmds.c Thu Jan 23 14:58:19 1992
- --- uip/mshcmds.c Mon Dec 14 16:21:27 1992
- ***************
- *** 1,7 ****
- /* mshcmds.c - command handlers in msh */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mshcmds.c,v 1.7 1992/01/23 22:58:03 jromine Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include "../h/dropsbr.h"
- --- 1,7 ----
- /* mshcmds.c - command handlers in msh */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: mshcmds.c,v 1.25 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include "../h/dropsbr.h"
- ***************
- *** 8,14 ****
- --- 8,20 ----
- #include "../h/formatsbr.h"
- #include "../h/scansbr.h"
- #include "../zotnet/tws.h"
- + #ifdef _AIX /* AIX 1.2.1 <stdio.h> declares getws() */
- + #define getws _getws
- + #endif
- #include <stdio.h>
- + #ifdef _AIX
- + #undef getws
- + #endif
- #include "../zotnet/mts.h"
- #include <ctype.h>
- #include <errno.h>
- ***************
- *** 33,38 ****
- --- 39,47 ----
- void clear_screen ();
- static int eom_action ();
- static FP mhl_action ();
- + #ifdef MIME
- + static int nontext();
- + #endif
-
-
- static burst(), forw(), rmm(), show(), ask(), copy_message(), copy_digest();
- ***************
- *** 42,47 ****
- --- 51,66 ----
- static int getws ();
- static char *sosmash ();
-
- + #if defined(NNTP) && defined(MPOP)
- + #undef MPOP
- + #endif
- + #ifdef MPOP
- + #ifdef BPOP
- + extern int pmsh;
- + extern char response[];
- + #endif
- + #endif /* MPOP */
- +
- /* */
-
- forkcmd (args, pgm)
- ***************
- *** 116,122 ****
- #define DIHELP 12
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 135,141 ----
- #define DIHELP 12
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 222,228 ****
- #define EXHELP 6
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 241,247 ----
- #define EXHELP 6
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 336,341 ****
- --- 355,361 ----
- msgp;
- long pos;
- char c,
- + cc,
- buffer[BUFSIZ];
- register FILE *zp;
-
- ***************
- *** 347,353 ****
- }
-
- pos = ftell (zp = msh_ready (msgnum, 1));
- ! for (msgp = 1; msgp <= MAXFOLDER;) {
- while (fgets (buffer, sizeof buffer, zp) != NULL
- && buffer[0] == '\n'
- && pos < Msgs[msgnum].m_stop)
- --- 367,373 ----
- }
-
- pos = ftell (zp = msh_ready (msgnum, 1));
- ! for (msgp = 0; msgp <= MAXFOLDER;) {
- while (fgets (buffer, sizeof buffer, zp) != NULL
- && buffer[0] == '\n'
- && pos < Msgs[msgnum].m_stop)
- ***************
- *** 357,369 ****
- (void) fseek (zp, pos, 0);
- smsgs[msgp].m_start = pos;
-
- ! for (c = NULL;
- ! fgets (buffer, sizeof buffer, zp) != NULL
- ! && pos < Msgs[msgnum].m_stop;
- c = buffer[0])
- if (strncmp (buffer, delim3, ld3) == 0
- ! && peekc (zp) == '\n'
- ! && (msgp == 1 || c == '\n'))
- break;
- else
- pos += (long) strlen (buffer);
- --- 377,389 ----
- (void) fseek (zp, pos, 0);
- smsgs[msgp].m_start = pos;
-
- ! for (c = 0;
- ! pos < Msgs[msgnum].m_stop
- ! && fgets (buffer, sizeof buffer, zp) != NULL;
- c = buffer[0])
- if (strncmp (buffer, delim3, ld3) == 0
- ! && (msgp == 1 || c == '\n')
- ! && peekc (zp) == '\n')
- break;
- else
- pos += (long) strlen (buffer);
- ***************
- *** 370,387 ****
-
- wasdlm = strncmp (buffer, delim3, ld3) == 0;
- if (smsgs[msgp].m_start != pos)
- ! smsgs[msgp++].m_stop = c == '\n' && wasdlm ? pos - 1 : pos;
- if (feof (zp) || pos >= Msgs[msgnum].m_stop) {
- ! if (wasdlm) {
- smsgs[msgp - 1].m_stop -= ((long) strlen (buffer) + 1);
- - msgp++; /* fake "End of XXX Digest" */
- - }
- break;
- }
- pos += (long) strlen (buffer);
- }
-
- ! switch (--msgp) { /* toss "End of XXX Digest" */
- case 0:
- adios (NULLCP, "burst() botch -- you lose big");
-
- --- 390,405 ----
-
- wasdlm = strncmp (buffer, delim3, ld3) == 0;
- if (smsgs[msgp].m_start != pos)
- ! smsgs[msgp++].m_stop = (c == '\n' && wasdlm) ? pos - 1 : pos;
- if (feof (zp) || pos >= Msgs[msgnum].m_stop) {
- ! if (wasdlm)
- smsgs[msgp - 1].m_stop -= ((long) strlen (buffer) + 1);
- break;
- }
- pos += (long) strlen (buffer);
- }
-
- ! switch (msgp--) { /* toss "End of XXX Digest" */
- case 0:
- adios (NULLCP, "burst() botch -- you lose big");
-
- ***************
- *** 393,405 ****
- default:
- if (verbosw)
- printf ("%d message%s exploded from digest %d\n",
- ! msgp - 1, msgp - 1 != 1 ? "s" : "", msgnum);
- ! if (msgp == 2)
- ! msgp++;
- break;
- }
-
- - msgp--;
- if ((i = msgp + mp -> hghmsg) > MAXFOLDER) {
- advise (NULLCP, "more than %d messages", MAXFOLDER);
- return NOTOK;
- --- 411,420 ----
- default:
- if (verbosw)
- printf ("%d message%s exploded from digest %d\n",
- ! msgp, msgp != 1 ? "s" : "", msgnum);
- break;
- }
-
- if ((i = msgp + mp -> hghmsg) > MAXFOLDER) {
- advise (NULLCP, "more than %d messages", MAXFOLDER);
- return NOTOK;
- ***************
- *** 408,419 ****
- adios (NULLCP, "unable to allocate folder storage");
-
- j = mp -> hghmsg;
- ! mp -> hghmsg += msgp - 1;
- ! mp -> nummsg += msgp - 1;
- if (mp -> hghsel > msgnum)
- ! mp -> hghsel += msgp - 1;
-
- ! if (inplace && msgp > 1)
- for (i = mp -> hghmsg; j > msgnum; i--, j--) {
- if (verbosw)
- printf ("message %d becomes message %d\n", j, i);
- --- 423,434 ----
- adios (NULLCP, "unable to allocate folder storage");
-
- j = mp -> hghmsg;
- ! mp -> hghmsg += msgp;
- ! mp -> nummsg += msgp;
- if (mp -> hghsel > msgnum)
- ! mp -> hghsel += msgp;
-
- ! if (inplace)
- for (i = mp -> hghmsg; j > msgnum; i--, j--) {
- if (verbosw)
- printf ("message %d becomes message %d\n", j, i);
- ***************
- *** 434,441 ****
- (void) readid (msgnum);
-
- mp -> msgstats[msgnum] &= ~SELECTED;
- ! i = inplace ? msgnum + msgp - 1 : mp -> hghmsg;
- ! for (j = msgp; j >= (inplace ? 1 : 2); i--, j--) {
- if (verbosw && i != msgnum)
- printf ("message %d of digest %d becomes message %d\n",
- j, msgnum, i);
- --- 449,456 ----
- (void) readid (msgnum);
-
- mp -> msgstats[msgnum] &= ~SELECTED;
- ! i = inplace ? msgnum + msgp : mp -> hghmsg;
- ! for (j = msgp; j >= (inplace ? 0 : 1); i--, j--) {
- if (verbosw && i != msgnum)
- printf ("message %d of digest %d becomes message %d\n",
- j, msgnum, i);
- ***************
- *** 475,481 ****
- #define FIHELP 9
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 490,496 ----
- #define FIHELP 9
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 652,658 ****
- #define FLHELP 15
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 667,673 ----
- #define FLHELP 15
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 737,743 ****
- }
-
- if (folder) {
- ! if (*folder == NULL) {
- advise (NULLCP, "null folder names are not permitted");
- return;
- }
- --- 752,758 ----
- }
-
- if (folder) {
- ! if (*folder == 0) {
- advise (NULLCP, "null folder names are not permitted");
- return;
- }
- ***************
- *** 839,844 ****
- --- 854,865 ----
-
- /* */
-
- + #ifndef MIME
- + #define MIMEminc(a) (a)
- + #else /* MIME */
- + #define MIMEminc(a) 0
- + #endif /* MIME */
- +
- static struct swit forwswit[] = {
- #define FOANSW 0
- "annotate", 0,
- ***************
- *** 866,879 ****
- "inplace", 0,
- #define FONINSW 12
- "noinplace", 0,
- ! #define FOWHTSW 13
- "whatnowproc program", 0,
- ! #define FONWTSW 14
- "nowhatnow", 0,
- ! #define FOHELP 15
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 887,904 ----
- "inplace", 0,
- #define FONINSW 12
- "noinplace", 0,
- ! #define FOMISW 13
- ! "mime", MIMEminc(-4),
- ! #define FONMISW 14
- ! "nomime", MIMEminc(-6),
- ! #define FOWHTSW 15
- "whatnowproc program", 0,
- ! #define FONWTSW 16
- "nowhatnow", 0,
- ! #define FOHELP 17
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 913,918 ****
- --- 938,945 ----
- case FONANSW:
- case FOINSW:
- case FONINSW:
- + case FOMISW:
- + case FONMISW:
- continue;
-
- case FONDFSW:
- ***************
- *** 959,965 ****
-
- /* foil search of .mh_profile */
- (void) sprintf (buf, "%sXXXXXX", invo_name);
- ! vec[0] = mktemp (buf);
- vec[vecp++] = "-file";
- vec[vecp] = NULL;
- if (!msgp)
- --- 986,992 ----
-
- /* foil search of .mh_profile */
- (void) sprintf (buf, "%sXXXXXX", invo_name);
- ! vec[0] = (char *)mktemp (buf);
- vec[vecp++] = "-file";
- vec[vecp] = NULL;
- if (!msgp)
- ***************
- *** 1151,1157 ****
- #define MDBUGSW 9
- "debug", -5,
-
- ! NULL, NULL
- };
-
- /* */
- --- 1178,1184 ----
- #define MDBUGSW 9
- "debug", -5,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 1271,1280 ****
- #ifndef MTR
- printf ("lowoff=%d hghoff=%d\n",
- mp -> lowoff, mp -> hghoff);
- ! #else MTR
- printf ("lowoff=%d hghoff=%d msgbase=0x%x msgstats=0x%x\n",
- mp -> lowoff, mp -> hghoff, mp -> msgbase, mp -> msgstats);
- ! #endif MTR
- }
-
- if (seqp == 0 && (addsw || deletesw)) {
- --- 1298,1307 ----
- #ifndef MTR
- printf ("lowoff=%d hghoff=%d\n",
- mp -> lowoff, mp -> hghoff);
- ! #else /* MTR */
- printf ("lowoff=%d hghoff=%d msgbase=0x%x msgstats=0x%x\n",
- mp -> lowoff, mp -> hghoff, mp -> msgbase, mp -> msgstats);
- ! #endif /* MTR */
- }
-
- if (seqp == 0 && (addsw || deletesw)) {
- ***************
- *** 1340,1345 ****
- --- 1367,1542 ----
-
- /* */
-
- + #ifdef MIME
- + static struct swit mhnswit[] = {
- + #define MHNAUTOSW 0
- + "auto", 0,
- + #define MHNNAUTOSW 1
- + "noauto", 0,
- + #define MHNDEBUGSW 2
- + "debug", -5,
- + #define MHNEBCDICSW 3
- + "ebcdicsafe", 0,
- + #define MHNNEBCDICSW 4
- + "noebcdicsafe", 0,
- + #define MHNFORMSW 5
- + "form formfile", 4,
- + #define MHNHEADSW 6
- + "headers", 0,
- + #define MHNNHEADSW 7
- + "noheaders", 0,
- + #define MHNLISTSW 8
- + "list", 0,
- + #define MHNNLISTSW 9
- + "nolist", 0,
- + #define MHNPARTSW 10
- + "part number", 0,
- + #define MHNSIZESW 11
- + "realsize", 0,
- + #define MHNNSIZESW 12
- + "norealsize", 0,
- + #define MHNRFC934SW 13
- + "rfc934mode", 0,
- + #define MHNNRFC934SW 14
- + "norfc934mode", 0,
- + #define MHNSERIALSW 15
- + "serialonly", 0,
- + #define MHNNSERIALSW 16
- + "noserialonly", 0,
- + #define MHNSHOWSW 17
- + "show", 0,
- + #define MHNNSHOWSW 18
- + "noshow", 0,
- + #define MHNSTORESW 19
- + "store", 0,
- + #define MHNNSTORESW 20
- + "nostore", 0,
- + #define MHNTYPESW 21
- + "type content", 0,
- + #define MHNVERBSW 22
- + "verbose", 0,
- + #define MHNNVERBSW 23
- + "noverbose", 0,
- + #define MHNHELPSW 24
- + "help", 4,
- + #define MHNPROGSW 25
- + "moreproc program", -4,
- + #define MHNNPROGSW 26
- + "nomoreproc", -3,
- + #define MHNLENSW 27
- + "length lines", -4,
- + #define MHNWIDSW 28
- + "width columns", -4,
- +
- + NULL, 0
- + };
- +
- + /* */
- +
- + mhncmd (args)
- + char **args;
- + {
- + int msgp = 0,
- + vecp = 1,
- + i,
- + msgnum;
- + char *cp,
- + buf[BUFSIZ],
- + *msgs[MAXARGS],
- + *vec[MAXARGS];
- +
- + if (fmsh) {
- + forkcmd (args, cmd_name);
- + return;
- + }
- +
- + while (cp = *args++) {
- + if (*cp == '-')
- + switch (smatch (++cp, mhnswit)) {
- + case AMBIGSW:
- + ambigsw (cp, mhnswit);
- + return;
- + case UNKWNSW:
- + fprintf (stderr, "-%s unknown\n", cp);
- + return;
- + case MHNHELPSW:
- + (void) sprintf (buf, "%s [msgs] [switches]", cmd_name);
- + help (buf, mhnswit);
- + return;
- +
- + case MHNAUTOSW:
- + case MHNNAUTOSW:
- + case MHNDEBUGSW:
- + case MHNEBCDICSW:
- + case MHNNEBCDICSW:
- + case MHNHEADSW:
- + case MHNNHEADSW:
- + case MHNLISTSW:
- + case MHNNLISTSW:
- + case MHNSIZESW:
- + case MHNNSIZESW:
- + case MHNRFC934SW:
- + case MHNNRFC934SW:
- + case MHNSERIALSW:
- + case MHNNSERIALSW:
- + case MHNSHOWSW:
- + case MHNNSHOWSW:
- + case MHNSTORESW:
- + case MHNNSTORESW:
- + case MHNVERBSW:
- + case MHNNVERBSW:
- + case MHNNPROGSW:
- + vec[vecp++] = --cp;
- + continue;
- +
- + case MHNFORMSW:
- + case MHNPARTSW:
- + case MHNTYPESW:
- + case MHNPROGSW:
- + case MHNLENSW:
- + case MHNWIDSW:
- + vec[vecp++] = --cp;
- + if (!(cp = *args++) || *cp == '-') {
- + advise (NULLCP, "missing argument to %s", args[-2]);
- + return;
- + }
- + vec[vecp++] = cp;
- + continue;
- + }
- + if (*cp == '+' || *cp == '@') {
- + advise (NULLCP, "sorry, no folders allowed!");
- + return;
- + }
- + else
- + msgs[msgp++] = cp;
- + }
- +
- + vec[0] = cmd_name;
- + vec[vecp++] = "-file";
- + vec[vecp] = NULL;
- + if (!msgp)
- + msgs[msgp++] = "cur";
- + for (msgnum = 0; msgnum < msgp; msgnum++)
- + if (!m_convert (mp, msgs[msgnum]))
- + return;
- + m_setseq (mp);
- +
- + interrupted = 0;
- + for (msgnum = mp -> lowsel;
- + msgnum <= mp -> hghsel && !interrupted;
- + msgnum++)
- + if (mp -> msgstats[msgnum] & SELECTED)
- + if (process (msgnum, cmd_name, vecp, vec)) {
- + mp -> msgstats[msgnum] &= ~SELECTED;
- + mp -> numsel--;
- + }
- +
- + m_setcur (mp, mp -> hghsel);
- + }
- +
- + /* */
- +
- + #endif /* MIME */
- static struct swit packswit[] = {
- #define PAFISW 0
- "file name", 0,
- ***************
- *** 1347,1353 ****
- #define PAHELP 1
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 1544,1550 ----
- #define PAHELP 1
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 1537,1543 ****
- #define PIHELP 22
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 1734,1740 ----
- #define PIHELP 22
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 1740,1746 ****
- #define REHELP 20
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 1937,1943 ----
- #define REHELP 20
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 1841,1847 ****
- #define RMHELP 0
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 2038,2044 ----
- #define RMHELP 0
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 1925,1930 ****
- --- 2122,2133 ----
- if (mp -> msgstats[msgnum] & SELECTED) {
- mp -> msgstats[msgnum] |= DELETED;
- mp -> msgstats[msgnum] &= ~EXISTS;
- + #ifdef MPOP
- + #ifdef BPOP
- + if (pmsh && pop_dele (msgnum) != OK)
- + fprintf (stderr, "%s", response);
- + #endif
- + #endif /* MPOP */
- }
-
- if ((mp -> nummsg -= mp -> numsel) <= 0) {
- ***************
- *** 1971,1977 ****
- #define SCHELP 7
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 2174,2180 ----
- #define SCHELP 7
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 1995,2000 ****
- --- 2198,2208 ----
- *nfs,
- *msgs[MAXARGS];
- register FILE *zp;
- + #ifdef MPOP
- + #ifdef BPOP
- + static int p_optim = 0;
- + #endif
- + #endif /* MPOP */
- static int s_optim = 0;
- static char *s_form = NULL,
- *s_format = NULL;
- ***************
- *** 2072,2081 ****
- --- 2280,2362 ----
- s_optim = optim = 1;
- s_form = form ? getcpy (form) : NULL;
- s_format = format ? getcpy (format) : NULL;
- +
- + #ifdef MPOP
- + #ifdef BPOP
- + if (pmsh) {
- + int i;
- + char *dp,
- + *ep,
- + *fp;
- +
- + if (width == 0)
- + width = sc_width ();
- +
- + for (dp = nfs, i = 0; *dp; dp++, i++)
- + if (*dp == '\\' || *dp == '"' || *dp == '\n')
- + i++;
- + i++;
- + if ((ep = malloc ((unsigned) i)) == NULL)
- + adios (NULLCP, "out of memory");
- + for (dp = nfs, fp = ep; *dp; dp++) {
- + if (*dp == '\n') {
- + *fp++ = '\\', *fp++ = 'n';
- + continue;
- + }
- + if (*dp == '"' || *dp == '\\')
- + *fp++ = '\\';
- + *fp++ = *dp;
- + }
- + *fp = NULL;
- +
- + if (pop_command ("XTND SCAN %d \"%s\"", width, ep) == OK)
- + p_optim = 1;
- +
- + free (ep);
- + }
- + #endif
- + #endif /* MPOP */
- }
- else
- optim = equiv (s_form, form) && equiv (s_format, format);
-
- + #ifdef MPOP
- + #ifdef BPOP
- + if (p_optim && optim) {
- + for (msgnum = mp -> lowmsg; msgnum <= mp -> hghmsg; msgnum++)
- + if (!(mp -> msgstats[msgnum] & SELECTED) || Msgs[msgnum].m_scanl)
- + break;
- + if (msgnum > mp -> hghmsg && pop_command ("LIST") == OK) {
- + fprintf (stderr, "Stand-by...");
- + fflush (stderr);
- +
- + for (;;) {
- + int size;
- +
- + switch (pop_multiline ()) {
- + case NOTOK:
- + fprintf (stderr, "%s", response);
- + /* and fall... */
- + case DONE:
- + fprintf (stderr,"\n");
- + break;
- +
- + case OK:
- + if (sscanf (response, "%d %d", &msgnum, &size) == 2
- + && mp -> lowmsg <= msgnum
- + && msgnum <= mp -> hghmsg
- + && (cp = index (response, '#'))
- + && *++cp)
- + Msgs[msgnum].m_scanl = concat (cp, "\n", NULLCP);
- + continue;
- + }
- + break;
- + }
- + }
- + }
- + #endif
- + #endif /* MPOP */
- +
- interrupted = 0;
- for (msgnum = mp -> lowsel;
- msgnum <= mp -> hghsel && !interrupted;
- ***************
- *** 2084,2092 ****
- if (optim && Msgs[msgnum].m_scanl)
- printf ("%s", Msgs[msgnum].m_scanl);
- else {
- zp = msh_ready (msgnum, 0);
- switch (state = scan (zp, msgnum, 0, nfs, width,
- ! msgnum == mp -> curmsg,
- headersw ? (fmsh ? fmsh : mp -> foldpath) : (char *)0,
- fmsh ? 0L : (long) (Msgs[msgnum].m_stop - Msgs[msgnum].m_start),
- 1)) {
- --- 2365,2389 ----
- if (optim && Msgs[msgnum].m_scanl)
- printf ("%s", Msgs[msgnum].m_scanl);
- else {
- + #ifdef MPOP
- + #ifdef BPOP
- + if (p_optim
- + && optim
- + && (mp -> msgstats[msgnum] & VIRTUAL)
- + && pop_command ("LIST %d", msgnum) == OK
- + && (cp = index (response, '#'))
- + && *++cp) {
- + Msgs[msgnum].m_scanl = concat (cp, "\n", NULLCP);
- + printf ("%s", Msgs[msgnum].m_scanl);
- + continue;
- + }
- + #endif
- + #endif /* MPOP */
- +
- zp = msh_ready (msgnum, 0);
- switch (state = scan (zp, msgnum, 0, nfs, width,
- ! msgnum == mp -> curmsg,
- ! mp -> msgstats[msgnum] & UNSEEN, /* ?? */
- headersw ? (fmsh ? fmsh : mp -> foldpath) : (char *)0,
- fmsh ? 0L : (long) (Msgs[msgnum].m_stop - Msgs[msgnum].m_start),
- 1)) {
- ***************
- *** 2139,2145 ****
- #define SHHELP 10
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 2436,2442 ----
- #define SHHELP 10
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 2239,2244 ****
- --- 2536,2553 ----
- return;
- m_setseq (mp);
-
- + #ifdef MIME
- + if (!nshow && !getenv ("NOMHNPROC"))
- + for (msgnum = mp -> lowsel; msgnum <= mp -> hghsel; msgnum++)
- + if ((mp -> msgstats[msgnum] & SELECTED) && nontext (msgnum)) {
- + proc = (cp = m_find ("mhnproc")) ? cp : "mhn";
- + vec[vecp++] = "-show";
- + vec[vecp++] = "-file";
- + vec[vecp] = NULL;
- + goto finish;
- + }
- + #endif /* MIME */
- +
- if (nshow)
- proc = "cat";
- else
- ***************
- *** 2247,2252 ****
- --- 2556,2562 ----
- mhl++;
- }
-
- + finish: ;
- seen = m_seqflag (mp, "unseen");
- vec[0] = r1bindex (proc, '/');
- if (mhl) {
- ***************
- *** 2356,2365 ****
- printf ("Press <return> to list \"%d\"...", msgnum);
- }
- (void) fflush (stdout);
- ! buf[0] = NULL;
- #ifndef BSD42
- (void) read (fileno (stdout), buf, sizeof buf);
- ! #else BSD42
- switch (setjmp (sigenv)) {
- case OK:
- should_intr = 1;
- --- 2666,2675 ----
- printf ("Press <return> to list \"%d\"...", msgnum);
- }
- (void) fflush (stdout);
- ! buf[0] = 0;
- #ifndef BSD42
- (void) read (fileno (stdout), buf, sizeof buf);
- ! #else /* BSD42 */
- switch (setjmp (sigenv)) {
- case OK:
- should_intr = 1;
- ***************
- *** 2369,2375 ****
- should_intr = 0;
- break;
- }
- ! #endif BSD42
- if (index (buf, '\n') == NULL)
- (void) putchar ('\n');
-
- --- 2679,2685 ----
- should_intr = 0;
- break;
- }
- ! #endif /* BSD42 */
- if (index (buf, '\n') == NULL)
- (void) putchar ('\n');
-
- ***************
- *** 2387,2392 ****
- --- 2697,2860 ----
-
- /* */
-
- + #ifdef MIME
- + #include "../h/mhn.h"
- +
- +
- + static int nontext (msgnum)
- + int msgnum;
- + {
- + int result,
- + state;
- + register char *bp,
- + *dp;
- + char *cp,
- + buf[BUFSIZ],
- + name[NAMESZ];
- + FILE *fp;
- +
- + if (Msgs[msgnum].m_flags & MHNCHK)
- + return (Msgs[msgnum].m_flags & MHNYES);
- + Msgs[msgnum].m_flags |= MHNCHK;
- +
- + fp = msh_ready (msgnum, 1);
- +
- + for (state = FLD;;)
- + switch (state = m_getfld (state, name, buf, sizeof buf, fp)) {
- + case FLD:
- + case FLDPLUS:
- + case FLDEOF:
- + if (uleq (name, TYPE_FIELD)) {
- + int passno;
- + char c;
- +
- + cp = add (buf, NULLCP);
- + while (state == FLDPLUS) {
- + state = m_getfld (state, name, buf, sizeof buf, fp);
- + cp = add (buf, cp);
- + }
- + bp = cp;
- + passno = 1;
- +
- + again: ;
- + for (; isspace (*bp); bp++)
- + continue;
- + if (*bp == '(') {
- + int i;
- +
- + for (bp++, i = 0;;) {
- + switch (*bp++) {
- + case '\0':
- + invalid: ;
- + result = 0;
- + goto out;
- + case '\\':
- + if (*bp++ == '\0')
- + goto invalid;
- + continue;
- + case '(':
- + i++;
- + /* and fall... */
- + default:
- + continue;
- + case ')':
- + if (--i < 0)
- + break;
- + continue;
- + }
- + break;
- + }
- + }
- + if (passno == 2) {
- + if (*bp != '/')
- + goto invalid;
- + bp++;
- + passno = 3;
- + goto again;
- + }
- + for (dp = bp; istoken (*dp); dp++)
- + continue;
- + c = *dp, *dp = NULL;
- + if (*bp == NULL)
- + goto invalid;
- + if (passno > 1) {
- + if (result = !uleq (bp, "plain"))
- + goto out;
- + *dp = c;
- + for (dp++; isspace (*dp); dp++)
- + continue;
- + if (result = !uprf (dp, "charset"))
- + goto out;
- + dp += sizeof "charset" - 1;
- + while (isspace (*dp))
- + dp++;
- + if (*dp++ != '=')
- + goto invalid;
- + while (isspace (*dp))
- + dp++;
- + if (*dp == '"') {
- + dp++;
- + if (strlen (dp) >= sizeof "us-ascii\""
- + && *(bp = dp + sizeof "us-ascii" - 1)=='"')
- + *bp = NULL;
- + }
- + else
- + if (strlen (dp) >= sizeof "us-ascii"
- + && isspace (*(bp =
- + dp + sizeof "us-ascii" - 1)))
- + *bp = NULL;
- + result = !uleq (dp, "us-ascii");
- + }
- + else
- + if (!(result = !uleq (bp, "text"))) {
- + *dp = c;
- + bp = dp;
- + passno = 2;
- + goto again;
- + }
- +
- + out: ;
- + free (cp);
- +
- + if (result) {
- + Msgs[msgnum].m_flags |= MHNYES;
- + return result;
- + }
- + break;
- + }
- + if (uleq (name, ENCODING_FIELD)) {
- + cp = add (buf, NULLCP);
- + while (state == FLDPLUS) {
- + state = m_getfld (state, name, buf, sizeof buf, fp);
- + cp = add (buf, cp);
- + }
- + for (bp = cp; isspace (*bp); bp++)
- + continue;
- + for (dp = bp; istoken (*dp); dp++)
- + continue;
- + *dp = NULL;
- + if (result = !uleq (bp, "7bit"))
- + Msgs[msgnum].m_flags |= MHNYES;
- +
- + free (cp);
- + if (result) {
- + Msgs[msgnum].m_flags |= MHNYES;
- + return result;
- + }
- + break;
- + }
- + while (state == FLDPLUS)
- + state = m_getfld (state, name, buf, sizeof buf, fp);
- + break;
- +
- + default:
- + return 0;
- + }
- + }
- + #endif /* MIME */
- +
- + /* */
- +
- static struct swit sortswit[] = {
- #define SODATE 0
- "datefield field", 0,
- ***************
- *** 2405,2411 ****
- #define SOHELP 7
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 2873,2879 ----
- #define SOHELP 7
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 2656,2665 ****
- cp = s;
- dp = s; /* dst pointer */
- if (uleq (subj, "subject"))
- ! while (c = *cp++) {
- if (! isspace(c)) {
- ! if ((c == 'R' || c == 'r') &&
- ! (cp[0] == 'e' || cp[0] == 'E') && cp[1] == ':')
- cp += 2;
- else {
- if (isalnum(c))
- --- 3124,3132 ----
- cp = s;
- dp = s; /* dst pointer */
- if (uleq (subj, "subject"))
- ! while (c = *cp) {
- if (! isspace(c)) {
- ! if(uprf(cp, "re:"))
- cp += 2;
- else {
- if (isalnum(c))
- ***************
- *** 2667,2672 ****
- --- 3134,3140 ----
- break;
- }
- }
- + cp++;
- }
- while (c = *cp++) {
- if (isalnum(c))
- *** ../mh-6.7.2/uip/packf.c Thu Oct 29 15:02:34 1987
- --- uip/packf.c Mon Dec 14 16:21:27 1992
- ***************
- *** 1,4 ****
- --- 1,7 ----
- /* packf.c - pack a folder (used to be called "pack") */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: packf.c,v 1.4 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include "../h/dropsbr.h"
- ***************
- *** 6,11 ****
- --- 9,17 ----
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
- /* */
-
- ***************
- *** 16,22 ****
- #define HELPSW 1
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 22,28 ----
- #define HELPSW 1
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 51,56 ****
- --- 57,65 ----
- struct msgs *mp;
- struct stat st;
-
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- invo_name = r1bindex (argv[0], '/');
- if ((cp = m_find (invo_name)) != NULL) {
- ap = brkstring (cp = getcpy (cp), " ", "\n");
- *** ../mh-6.7.2/uip/pick.c Thu Oct 29 15:02:35 1987
- --- uip/pick.c Mon Dec 14 16:21:28 1992
- ***************
- *** 1,8 ****
- --- 1,14 ----
- /* pick.c - select messages by content */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: pick.c,v 1.4 1992/12/15 00:20:22 jromine Exp $";
- + #endif /* lint */
-
- #include "../h/mh.h"
- #include "../zotnet/tws.h"
- #include <stdio.h>
- + #ifdef LOCALE
- + #include <locale.h>
- + #endif
-
- /* */
-
- ***************
- *** 58,64 ****
- #define HELPSW 22
- "help", 4,
-
- ! NULL, NULL
- };
-
- /* */
- --- 64,70 ----
- #define HELPSW 22
- "help", 4,
-
- ! NULL, 0
- };
-
- /* */
- ***************
- *** 93,98 ****
- --- 99,107 ----
- struct msgs *mp;
- register FILE *fp;
-
- + #ifdef LOCALE
- + setlocale(LC_ALL, "");
- + #endif
- invo_name = r1bindex (argv[0], '/');
- if ((cp = m_find (invo_name)) != NULL) {
- ap = brkstring (cp = getcpy (cp), " ", "\n");
- *** ../mh-6.7.2/uip/picksbr.c Thu Apr 5 16:03:46 1990
- --- uip/picksbr.c Mon Dec 14 16:21:29 1992
- ***************
- *** 1,7 ****
- /* picksbr.c - routines to help pick along... */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: picksbr.c,v 1.5 90/04/05 15:01:50 sources Exp $";
- ! #endif lint
-
- #include "../h/mh.h"
- #include "../zotnet/tws.h"
- --- 1,7 ----
- /* picksbr.c - routines to help pick along... */
- #ifndef lint
- ! static char ident[] = "@(#)$Id: picksbr.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
- ! #endif /* lint */
-
- #include "../h/mh.h"
- #include "../zotnet/tws.h"
- ***************
- *** 43,49 ****
- #define PRDATF 14
- "datefield field", 5,
-
- ! NULL, NULL
- };
-
- /* DEFINITIONS FOR PATTERN MATCHING */
- --- 43,49 ----
- #define PRDATF 14
- "datefield field", 5,
-
- ! NULL, 0
- };
-
- /* DEFINITIONS FOR PATTERN MATCHING */
- ***************
- *** 668,674 ****
- *p1++ = c;
- }
-
- ! *p1++ = NULL;
- cbp = p2;
- p1 = linebuf;
- p2 = n -> n_expbuf;
- --- 668,674 ----
- *p1++ = c;
- }
-
- ! *p1++ = 0;
- cbp = p2;
- p1 = linebuf;
- p2 = n -> n_expbuf;
- ***************
- *** 844,855 ****
- if ((tw = dparsetime (buffer)) != NULL)
- return tw;
-
- ! (void) sprintf (buffer, "%02d %s %02d %s",
- ts -> tw_mday, tw_moty[ts -> tw_mon], ts -> tw_year, ap);
- if ((tw = dparsetime (buffer)) != NULL)
- return tw;
-
- ! (void) sprintf (buffer, "%02d %s %02d %s %s",
- ts -> tw_mday, tw_moty[ts -> tw_mon], ts -> tw_year,
- ap, dtwszone (ts));
- if ((tw = dparsetime (buffer)) != NULL)
- --- 844,855 ----
- if ((tw = dparsetime (buffer)) != NULL)
- return tw;
-
- ! (void) sprintf (buffer, "%02d %s %04d %s",
- ts -> tw_mday, tw_moty[ts -> tw_mon], ts -> tw_year, ap);
- if ((tw = dparsetime (buffer)) != NULL)
- return tw;
-
- ! (void) sprintf (buffer, "%02d %s %04d %s %s",
- ts -> tw_mday, tw_moty[ts -> tw_mon], ts -> tw_year,
- ap, dtwszone (ts));
- if ((tw = dparsetime (buffer)) != NULL)
- *** /dev/null Tue Dec 15 08:01:10 1992
- --- uip/popi.c Wed Oct 28 13:34:36 1992
- ***************
- *** 0 ****
- --- 1,685 ----
- + /* popi.c - POP initiator - for MPOP */
- + #ifndef lint
- + static char ident[] = "@(#)$Id: popi.c,v 1.8 1992/10/28 18:52:45 jromine Exp $";
- + #endif lint
- +
- + #include "../h/mh.h"
- + #include "../h/formatsbr.h"
- + #include "../h/scansbr.h"
- + #include <errno.h>
- + #include <stdio.h>
- + #include <sys/types.h>
- + #ifdef SMTP
- + #include "../h/local.h"
- + #else /* SMTP */
- + #include <sys/stat.h>
- + #endif /* SMTP */
- + #include "../zotnet/mts.h"
- +
- + /* */
- +
- + #ifndef RPOP
- + #define RPOPminc(a) (a)
- + #else
- + #define RPOPminc(a) 0
- + #endif
- +
- + #ifndef APOP
- + #define APOPminc(a) (a)
- + #else
- + #define APOPminc(a) 0
- + #endif
- +
- + #ifndef BPOP
- + #define BPOPminc(a) (a)
- + #else
- + #define BPOPminc(a) 0
- + #endif
- +
- + #ifndef SMTP
- + #define BULKminc(a) (a)
- + #else
- + #define BULKminc(a) 0
- + #endif
- +
- + static struct swit switches[] = {
- + #define APOPSW 0
- + "apop", APOPminc (-4),
- + #define NAPOPSW 1
- + "noapop", APOPminc (-6),
- +
- + #define AUTOSW 2
- + "auto", BPOPminc(-4),
- + #define NAUTOSW 3
- + "noauto", BPOPminc(-6),
- +
- + #define BULKSW 4
- + "bulk directory", BULKminc(-4),
- +
- + #define FORMSW 5
- + "form formatfile", 0,
- +
- + #define FMTSW 6
- + "format string", 5,
- +
- + #define HOSTSW 7
- + "host host", 0,
- +
- + #define PROGSW 8
- + "mshproc program", 0,
- +
- + #define RPOPSW 9
- + "rpop", RPOPminc (-4),
- + #define NRPOPSW 10
- + "norpop", RPOPminc (-6),
- +
- + #define USERSW 11
- + "user user", 0,
- +
- + #define WIDSW 12
- + "width columns", 0,
- +
- + #define HELPSW 13
- + "help", 4,
- +
- + NULL, 0
- + };
- +
- + /* */
- +
- + static char *bulksw = NULLCP;
- + static int snoop = 0;
- + static int width = 0;
- +
- + static char mailname[BUFSIZ];
- +
- + static char *nfs = NULL;
- +
- + static struct msgs *mp;
- +
- + extern int errno;
- +
- + extern char response[];
- +
- + /* */
- +
- + /* ARGSUSED */
- +
- + main (argc, argv)
- + int argc;
- + char *argv[];
- + {
- + int autosw = 1,
- + noisy = 1,
- + rpop;
- + char *cp,
- + *maildir,
- + *folder = NULL,
- + *form = NULL,
- + *format = NULL,
- + *host = NULL,
- + *user = NULL,
- + *pass = NULL,
- + buf[100],
- + **ap,
- + **argp,
- + *arguments[MAXARGS];
- + struct stat st;
- +
- + invo_name = r1bindex (argv[0], '/');
- + mts_init (invo_name);
- + if (pophost && *pophost)
- + host = pophost;
- + if ((cp = getenv ("MHPOPDEBUG")) && *cp)
- + snoop++;
- + if ((cp = m_find (invo_name)) != NULL) {
- + ap = brkstring (cp = getcpy (cp), " ", "\n");
- + ap = copyip (ap, arguments);
- + }
- + else
- + ap = arguments;
- + (void) copyip (argv + 1, ap);
- + argp = arguments;
- +
- + rpop = getuid () && !geteuid ();
- +
- + /* */
- +
- + while (cp = *argp++) {
- + if (*cp == '-')
- + switch (smatch (++cp, switches)) {
- + case AMBIGSW:
- + ambigsw (cp, switches);
- + done (1);
- + case UNKWNSW:
- + adios (NULLCP, "-%s unknown", cp);
- + case HELPSW:
- + (void) sprintf (buf, "%s [+folder] [switches]", invo_name);
- + help (buf, switches);
- + done (1);
- +
- + case AUTOSW:
- + autosw = 1;
- + continue;
- + case NAUTOSW:
- + autosw = 0;
- + continue;
- +
- + case BULKSW:
- + if (!(bulksw = *argp++) || *bulksw == '-')
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + continue;
- +
- + case FORMSW:
- + if (!(form = *argp++) || *form == '-')
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + format = NULL;
- + continue;
- + case FMTSW:
- + if (!(format = *argp++) || *format == '-')
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + form = NULL;
- + continue;
- +
- + case WIDSW:
- + if (!(cp = *argp++) || *cp == '-')
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + width = atoi (cp);
- + continue;
- +
- + case HOSTSW:
- + if (!(host = *argp++) || *host == '-')
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + continue;
- + case USERSW:
- + if (!(user = *argp++) || *user == '-')
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + continue;
- +
- + case APOPSW:
- + rpop = -1;
- + continue;
- + case RPOPSW:
- + rpop = 1;
- + continue;
- + case NAPOPSW:
- + case NRPOPSW:
- + rpop = 0;
- + continue;
- +
- + case PROGSW:
- + if (!(mshproc = *argp++) || *mshproc == '-')
- + adios (NULLCP, "missing argument to %s", argp[-2]);
- + continue;
- + }
- + if (*cp == '+' || *cp == '@') {
- + if (folder)
- + adios (NULLCP, "only one folder at a time!");
- + else
- + folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
- + }
- + else
- + adios (NULLCP, "usage: %s [+folder] [switches]", invo_name);
- + }
- +
- + /* */
- +
- + if (!host)
- + adios (NULLCP, "usage: %s -h